1
0
mirror of https://github.com/pooneyy/1Panel-Appstore.git synced 2026-03-20 09:41:07 +08:00
github-action update-app-version 2c84e1ed5d Update app version [skip ci]
2024-09-28 16:30:12 +00:00

18 lines
483 B
Bash

#!/bin/bash
BOTCRON='/var/spool/cron/crontabs/root'
cert_hook(){
grep 'acme' ${BOTCRON} >/dev/null
if [ ${?} = 0 ]; then
grep 'lswsctrl' ${BOTCRON} >/dev/null
if [ ${?} = 0 ]; then
echo 'Hook already exist, skip!'
else
sed -i 's/--cron/--cron --renew-hook "\/usr\/local\/lsws\/bin\/lswsctrl restart"/g' ${BOTCRON}
fi
else
echo "[X] ${BOTCRON} does not exist, please check it later!"
fi
}
cert_hook