Skip to content

Commit

Permalink
Remove image default crontab when different user
Browse files Browse the repository at this point in the history
When the COMANAGE_REGISTRY_CRON_USER environment variable is
set remove the the image default crontab file for the www-data
user.
  • Loading branch information
skoranda committed Aug 30, 2022
1 parent fc466ef commit 65e03a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions comanage-registry-base/comanage_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 65e03a7

Please sign in to comment.