|
|
|
@ -171,10 +171,6 @@ generate-ssl-certificate LOGIN [TRUE | FALSE]
|
|
|
|
|
Generate the Let's Encrypt certificate
|
|
|
|
|
Run in TEST mode if TRUE
|
|
|
|
|
|
|
|
|
|
update-ssl-vhost-configuration LOGIN
|
|
|
|
|
|
|
|
|
|
Add the 443 port to the vhost configuration and reload the service
|
|
|
|
|
|
|
|
|
|
EOT
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -873,9 +869,6 @@ arg_processing() {
|
|
|
|
|
generate-ssl-certificate)
|
|
|
|
|
op_generatesslcertificate "$@"
|
|
|
|
|
;;
|
|
|
|
|
update-ssl-vhost-configuration)
|
|
|
|
|
op_updatesslvhost "$@"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
usage
|
|
|
|
|
;;
|
|
|
|
@ -918,24 +911,6 @@ op_generatesslcertificate() {
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
op_updatesslvhost() {
|
|
|
|
|
if [ $# -eq 1 ]; then
|
|
|
|
|
vhostfile="/etc/apache2/sites-available/$1.conf"
|
|
|
|
|
|
|
|
|
|
sed -i "s/:80>/:80 *:443>/" "$vhostfile"
|
|
|
|
|
|
|
|
|
|
configtest_out=$(apache2ctl configtest)
|
|
|
|
|
configtest_rc=$?
|
|
|
|
|
|
|
|
|
|
if [ "$configtest_rc" = "0" ]; then
|
|
|
|
|
/etc/init.d/apache2 force-reload >/dev/null
|
|
|
|
|
else
|
|
|
|
|
echo $configtest_out >&2
|
|
|
|
|
fi
|
|
|
|
|
else usage
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
op_managehttpchallengefile() {
|
|
|
|
|
if [ $# -eq 1 ]; then
|
|
|
|
|
folder="/var/lib/letsencrypt/.well-known"
|
|
|
|
|