From c138c692b209d12adf40fae65894a9a1500cb484 Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Thu, 20 Jul 2023 07:43:21 +0900 Subject: [PATCH] Update autoRepackUbuntuCloudImages.sh --- Linux_reinstall/Ubuntu/autoRepackUbuntuCloudImages.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Linux_reinstall/Ubuntu/autoRepackUbuntuCloudImages.sh b/Linux_reinstall/Ubuntu/autoRepackUbuntuCloudImages.sh index 60040af..875043d 100644 --- a/Linux_reinstall/Ubuntu/autoRepackUbuntuCloudImages.sh +++ b/Linux_reinstall/Ubuntu/autoRepackUbuntuCloudImages.sh @@ -27,7 +27,7 @@ for distName in "jammy" "focal"; do done # write crontab task -if [[ ! `grep -i "autorepackimages" /etc/crontab` ]]; then - sed -i '$i 30 4 * * 0 root bash /root/autoRepackImages.sh' /etc/crontab +if [[ ! `grep -i "autorepackubuntucloudimages" /etc/crontab` ]]; then + sed -i '$i 30 4 * * 0 root bash /root/autoRepackUbuntuCloudImages.sh' /etc/crontab /etc/init.d/cron restart fi