fix: cheeck for atd

This commit is contained in:
Cyber 2024-07-25 06:31:10 +00:00
parent 437cdf0456
commit 8a31698687

View File

@ -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 '[^"]*$') 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 atd
at -t $(date -d $date +'%Y%m%d%H%M') -f /var/tools/container-expire-notifs/notify.sh at -t $(date -d $date +'%Y%m%d%H%M') -f /var/tools/container-expire-notifs/notify.sh