Skip to content

Commit

Permalink
custom letsencrypt renew hook
Browse files Browse the repository at this point in the history
  • Loading branch information
jnorell committed Jun 25, 2021
1 parent 36cdb85 commit 22e34a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/scripts/letsencrypt_renew_hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@

## If you need a custom hook file, create a file with the same name in
## /usr/local/ispconfig/server/conf-custom/scripts/
##
## End the file with 'return 124' to signal that this script should not terminate.
if [ -e "/usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_renew_hook.sh" ] ; then
. /usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_renew_hook.sh && exit 0 || exit 1;
. /usr/local/ispconfig/server/conf-custom/scripts/letsencrypt_renew_hook.sh
ret=$?
if [ $ret != 124 ]; then exit $ret; fi
fi

hostname=$(hostname -f)
Expand Down Expand Up @@ -52,4 +56,4 @@ if [ -d "$lelive" ]; then
if [ $(dpkg-query -W -f='${Status}' nginx 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service nginx restart; fi
if [ $(dpkg-query -W -f='${Status}' apache2 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service apache2 restart; fi
fi
else echo `/bin/date` "Your Lets Encrypt SSL certs path for your ISPConfig server FQDN is missing.$line" >> /var/log/ispconfig/ispconfig.log; fi
else echo `/bin/date` "Your Lets Encrypt SSL certs path for your ISPConfig server FQDN is missing.$line" >> /var/log/ispconfig/ispconfig.log; fi

0 comments on commit 22e34a1

Please sign in to comment.