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