aboutsummaryrefslogtreecommitdiffstats
path: root/roles/web/files/600.acme-sh
blob: fdf4cc4dc926647d8039b2a4962edb9b339950bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
#
# Monthly task to renew and deploy acme certificates.

if [ -r /etc/defaults/periodic.conf ]; then
	. /etc/defaults/periodic.conf
	source_periodic_confs
fi

export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

case "$monthly_acme_sh_enable" in
	[Yy][Ee][Ss])
		echo
		echo "Checking Let's Encrypt certificates:"
		if [ -x "$monthly_acme_sh_renewscript" ]; then
			echo "Renewing certificates ..."
			$monthly_acme_sh_renewscript
			if [ -x "$monthly_acme_sh_deployscript" ]; then
				echo "Deploying certificates ..."
				$monthly_acme_sh_deployscript
			fi
		fi
		;;
	*)
		;;
esac