summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-10-13 15:18:29 -0400
committerAndrew Cady <d@jerkface.net>2020-10-13 15:18:29 -0400
commitff25674ce7704ebbca788e9b2125bc4537bbfcc2 (patch)
tree0f607c1092b7e42e8d8dd7b9a85a1abf64003228
parent35457e0429d445f0a06a6f5afb9244f18f21d487 (diff)
fix
-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