From 8a3169868764f692a13540db5bc26884e81526e1 Mon Sep 17 00:00:00 2001 From: Cyber Date: Thu, 25 Jul 2024 06:31:10 +0000 Subject: [PATCH] fix: cheeck for atd --- enable-expire-notifs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enable-expire-notifs.sh b/enable-expire-notifs.sh index bf16d49..ac05b48 100755 --- a/enable-expire-notifs.sh +++ b/enable-expire-notifs.sh @@ -19,7 +19,7 @@ echo $API_KEY > /var/tools/container-expire-notifs/.api-key date=$(curl -sH "x-ssh-auth: $API_KEY" $API_HOST/time | grep -o '"expireDate":"[^"]*' | grep -o '[^"]*$') -[ if ! grep atd /start.sh ] sed -i -e 's/#s2lmain/atd/g' /start.sh +if ! grep -q "atd" /start.sh; then sed -i -e 's/#s2lmain/atd/g' /start.sh; fi atd at -t $(date -d $date +'%Y%m%d%H%M') -f /var/tools/container-expire-notifs/notify.sh