From 5b5051004b0d9aa6e61d6cf16acaef3be84b1b6a Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 4 May 2021 18:42:09 +0200 Subject: [PATCH] fix: [rsync-backup-target] service would not be restarted upon admin key change Signed-off-by: Valentin Lab --- rsync-backup-target/hooks/init | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rsync-backup-target/hooks/init b/rsync-backup-target/hooks/init index 475c711..3be9943 100755 --- a/rsync-backup-target/hooks/init +++ b/rsync-backup-target/hooks/init @@ -57,6 +57,11 @@ rebuild-config() { local_path_key=/etc/rsync/keys/admin host_path_key="$SERVICE_CONFIGSTORE${local_path_key}" + +CONTROL_USERS_FILE="$SERVICE_DATASTORE/.control-pass" +## Was it already properly propagated to database ? +control_users=$(H "${admin_keys}" "$(declare -f "rebuild-config")") + init-config-add "\ $SERVICE_NAME: volumes: @@ -65,11 +70,6 @@ $SERVICE_NAME: - compose.config_hash=$control_users " -CONTROL_USERS_FILE="$SERVICE_DATASTORE/.control-pass" -## Was it already properly propagated to database ? -control_users=$(H "${admin_keys}" "$(declare -f "rebuild-config")") - - if [ -e "$CONTROL_USERS_FILE" ] && [ "$control_users" == "$(cat "$CONTROL_USERS_FILE")" ]; then exit 0 fi