freebsd-ports/security/lego/files/604.lego.in
Rodrigo Osorio 9b6f8163df Add new port security/lego
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>
2019-07-24 07:50:14 +00:00

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