mirror of
https://github.com/10h30/ols-docker-env.git
synced 2026-05-12 23:31:35 +09:00
12 lines
310 B
Bash
Executable File
12 lines
310 B
Bash
Executable File
#!/bin/bash
|
|
BOTCRON='/etc/cron.d/certbot'
|
|
|
|
certbothook(){
|
|
grep 'lswsctrl restart' ${BOTCRON} >/dev/null
|
|
if [ ${?} = 1 ]; then
|
|
echo 'Add LSWS hook to certbot cronjob.'
|
|
sed -i 's/0.*renew/& --deploy-hook "\/usr\/local\/lsws\/bin\/lswsctrl restart"/g' ${BOTCRON}
|
|
fi
|
|
}
|
|
|
|
certbothook |