summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--selfpublish.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/selfpublish.sh b/selfpublish.sh
index bbef8cc..64ccd37 100644
--- a/selfpublish.sh
+++ b/selfpublish.sh
@@ -318,6 +318,8 @@ get_sshfp()
318 318
319KEY_FILE=/etc/ssh/ssh_host_${DEFAULT_AUTH_TYPE}_key 319KEY_FILE=/etc/ssh/ssh_host_${DEFAULT_AUTH_TYPE}_key
320 320
321delegate_command=/usr/lib/cryptonomic/cryptonomic-$1
322
321if [ $# = 0 -o "$1" = hostname ] 323if [ $# = 0 -o "$1" = hostname ]
322then 324then
323 325
@@ -338,9 +340,10 @@ then
338 su -c "$(bash -c 'printf "%q " "$@"' bash "$@")" 340 su -c "$(bash -c 'printf "%q " "$@"' bash "$@")"
339 341
340 fi 342 fi
341elif [ -f /usr/lib/cryptonomic/cryptonomic-"$1" ] 343elif [ -x "$delegate_command" ]
342then 344then
343 exec /usr/lib/cryptonomic/cryptonomic-"$1" "$@" 345 shift
346 exec "$delegate_command" "$@"
344 347
345else 348else
346 echo "Usage: $0 [dyndns|hostname|gpg]" >&2 349 echo "Usage: $0 [dyndns|hostname|gpg]" >&2