diff options
author | Andrew Cady <d@jerkface.net> | 2020-10-13 15:18:29 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2020-10-13 15:18:29 -0400 |
commit | ff25674ce7704ebbca788e9b2125bc4537bbfcc2 (patch) | |
tree | 0f607c1092b7e42e8d8dd7b9a85a1abf64003228 | |
parent | 35457e0429d445f0a06a6f5afb9244f18f21d487 (diff) |
fix
-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 |