diff options
-rw-r--r-- | selfpublish.sh | 7 |
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 | ||
319 | KEY_FILE=/etc/ssh/ssh_host_${DEFAULT_AUTH_TYPE}_key | 319 | KEY_FILE=/etc/ssh/ssh_host_${DEFAULT_AUTH_TYPE}_key |
320 | 320 | ||
321 | delegate_command=/usr/lib/cryptonomic/cryptonomic-$1 | ||
322 | |||
321 | if [ $# = 0 -o "$1" = hostname ] | 323 | if [ $# = 0 -o "$1" = hostname ] |
322 | then | 324 | then |
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 |
341 | elif [ -f /usr/lib/cryptonomic/cryptonomic-"$1" ] | 343 | elif [ -x "$delegate_command" ] |
342 | then | 344 | then |
343 | exec /usr/lib/cryptonomic/cryptonomic-"$1" "$@" | 345 | shift |
346 | exec "$delegate_command" "$@" | ||
344 | 347 | ||
345 | else | 348 | else |
346 | echo "Usage: $0 [dyndns|hostname|gpg]" >&2 | 349 | echo "Usage: $0 [dyndns|hostname|gpg]" >&2 |