mirror of
https://github.com/10h30/ols-docker-env.git
synced 2026-05-12 15:21:24 +09:00
add hook, fix demo script
This commit is contained in:
@@ -71,7 +71,7 @@ set_vh_docroot(){
|
||||
if [ "${VHNAME}" != '' ]; then
|
||||
VH_ROOT="${DEFAULT_VH_ROOT}/${VHNAME}"
|
||||
VH_DOC_ROOT="${DEFAULT_VH_ROOT}/${VHNAME}/html"
|
||||
WP_CONS_TCONF="${VH_DOC_ROOT}/wp-content/plugins/litespeed-cache/data/const.default.ini"
|
||||
WP_CONST_CONF="${VH_DOC_ROOT}/wp-content/plugins/litespeed-cache/data/const.default.ini"
|
||||
elif [ -d ${DEFAULT_VH_ROOT}/${1}/html ]; then
|
||||
VH_ROOT="${DEFAULT_VH_ROOT}/${1}"
|
||||
VH_DOC_ROOT="${DEFAULT_VH_ROOT}/${1}/html"
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user