website and p2pool graceful stop

This commit is contained in:
Matthew Tran
2024-09-17 02:02:35 +00:00
parent c888f10a52
commit c3ef9eb514
6 changed files with 32 additions and 8 deletions
+7 -6
View File
@@ -16,10 +16,11 @@ certbot --nginx \
nginx -s reload
python3 ip_update.py &
python3 cert_update.py &
# try renew once a day
while true
do
certbot renew --quiet
sleep 86400
done
cleanup() {
echo "stopping..."
}
trap 'cleanup' TERM
wait $! # wait SIGTERM, other processes can just be killed