9b6f8163df
Lego is a new let's encrypt client write in Go with support for number of ACME challenges and no external dependencies. PR: 237349 Submitted by: Matthew Horan <matt@matthoran.com>
32 lines
686 B
Bash
32 lines
686 B
Bash
#!/bin/sh
|
|
|
|
if [ -r /etc/defaults/periodic.conf ]
|
|
then
|
|
. /etc/defaults/periodic.conf
|
|
source_periodic_confs
|
|
fi
|
|
|
|
PATH=$PATH:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
|
|
export PATH
|
|
|
|
case "$weekly_lego_enable" in
|
|
[Yy][Ee][Ss])
|
|
echo
|
|
echo "Checking Let's Encrypt certificate status:"
|
|
|
|
if [ -x "$weekly_lego_renewscript" ] ; then
|
|
echo "$weekly_lego_renewscript" | su -fm _lego || exit 3
|
|
fi
|
|
|
|
if [ -n "$weekly_lego_deployscript" ] ; then
|
|
if [ -x "$weekly_lego_deployscript" ] ; then
|
|
echo "Deploying Let's Encrypt certificates:"
|
|
$weekly_lego_deployscript || exit 3
|
|
else
|
|
echo 'Skipped, deploy script does not exist or is not executable'
|
|
fi
|
|
fi
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|