Closed shor0814 closed 5 months ago
When generating the crontab for the certbot check, the logic skips Centos 9. I assume that the entry for one of the other versions will work correctly.
Maybe:
elif [ "${OSNAME}" = 'centos' ]; then if [ "${OSVER}" = '7' ]; then echo "0 0,12 root python -c 'import random; import time; time.sleep(random.random() 3600)' && certbot renew -q --deploy-hook 'systemctl restart lsws'" \ | sudo tee -a /etc/crontab > /dev/null elif [ "${OSVER}" = '8' ]; then echo "0 0,12 root python3 -c 'import random; import time; time.sleep(random.random() 3600)' && /usr/local/bin/certbot renew -q --deploy-hook 'systemctl restart lsws'" \ | sudo tee -a /etc/crontab > /dev/null elif [ "${OSVER}" = '9' ]; then echo "0 0,12 root python3 -c 'import random; import time; time.sleep(random.random() 3600)' && /usr/local/bin/certbot renew -q --deploy-hook 'systemctl restart lsws'" \ | sudo tee -a /etc/crontab > /dev/null else echoY 'Please check certbot crontab'
Love the utilities.
Thanks. I just updated the vhost script in the latest commit
When generating the crontab for the certbot check, the logic skips Centos 9. I assume that the entry for one of the other versions will work correctly.
Maybe:
elif [ "${OSNAME}" = 'centos' ]; then if [ "${OSVER}" = '7' ]; then echo "0 0,12 root python -c 'import random; import time; time.sleep(random.random() 3600)' && certbot renew -q --deploy-hook 'systemctl restart lsws'" \ | sudo tee -a /etc/crontab > /dev/null elif [ "${OSVER}" = '8' ]; then echo "0 0,12 root python3 -c 'import random; import time; time.sleep(random.random() 3600)' && /usr/local/bin/certbot renew -q --deploy-hook 'systemctl restart lsws'" \ | sudo tee -a /etc/crontab > /dev/null elif [ "${OSVER}" = '9' ]; then echo "0 0,12 root python3 -c 'import random; import time; time.sleep(random.random() 3600)' && /usr/local/bin/certbot renew -q --deploy-hook 'systemctl restart lsws'" \ | sudo tee -a /etc/crontab > /dev/null else echoY 'Please check certbot crontab'
Love the utilities.