From 65e03a7af102f2a2c462650e525dbc37bb2c9a91 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Tue, 30 Aug 2022 07:11:55 -0500 Subject: [PATCH] Remove image default crontab when different user When the COMANAGE_REGISTRY_CRON_USER environment variable is set remove the the image default crontab file for the www-data user. --- comanage-registry-base/comanage_utils.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/comanage-registry-base/comanage_utils.sh b/comanage-registry-base/comanage_utils.sh index edf0d44..c05695b 100644 --- a/comanage-registry-base/comanage_utils.sh +++ b/comanage-registry-base/comanage_utils.sh @@ -199,6 +199,9 @@ function comanage_utils::deploy_crontab() { if [[ -n "${COMANAGE_REGISTRY_CRON_USER}" ]]; then cronuser="${COMANAGE_REGISTRY_CRON_USER}" + + echo "Removing image default crontab for user www-data ..." > "${OUTPUT}" 2>&1 + /usr/bin/crontab -u www-data -r > "${OUTPUT}" 2>&1 else cronuser="www-data" fi