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>
backup
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
if [ "${prev_key}" == "$SSH_PUBLIC_KEY" ]; then
echo "Key was already setup."
info "Key is already setup correctly."
exit 0
fi
@ -137,13 +137,13 @@ EOF
## reloading (could be much faster)
compose --debug down && compose --debug up
if [ "$?" == 0 ]; then
echo "Added key, and restarted service ${DARKYELLOW}$service_name${NORMAL}."
info "Added key, and restarted service ${DARKYELLOW}$service_name${NORMAL}."
else
echo "something went wrong ! Should check the state of '$DOMAIN' !!"
err "something went wrong ! Should check the state of '$DOMAIN' !!"
exit 1
fi
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
}

Loading…
Cancel
Save