Browse Source

fix: [rsync-backup-target] ensure that non data output of ``compose-add-rsync-key`` is cast on stderr

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
pull/1/head
Valentin Lab 4 years ago
parent
commit
3ecad191e9
  1. 8
      rsync-backup-target/resources/bin/compose-add-rsync-key

8
rsync-backup-target/resources/bin/compose-add-rsync-key

@ -77,7 +77,7 @@ cmdline.spec::cmd:__main__:run() {
fi fi
if [ "${prev_key}" == "$SSH_PUBLIC_KEY" ]; then if [ "${prev_key}" == "$SSH_PUBLIC_KEY" ]; then
echo "Key was already setup."
info "Key is already setup correctly."
exit 0 exit 0
fi fi
@ -137,13 +137,13 @@ EOF
## reloading (could be much faster) ## reloading (could be much faster)
compose --debug down && compose --debug up compose --debug down && compose --debug up
if [ "$?" == 0 ]; then if [ "$?" == 0 ]; then
echo "Added key, and restarted service ${DARKYELLOW}$service_name${NORMAL}."
info "Added key, and restarted service ${DARKYELLOW}$service_name${NORMAL}."
else else
echo "something went wrong ! Should check the state of '$DOMAIN' !!"
err "something went wrong ! Should check the state of '$DOMAIN' !!"
exit 1 exit 1
fi fi
else else
echo "Added key, you'll need to restart service ${DARKYELLOW}$service_name${NORMAL}."
info "Added key, you'll need to restart service ${DARKYELLOW}$service_name${NORMAL}."
fi fi
} }

Loading…
Cancel
Save