delete methods updating the vhost after cert installation is completed

Cette révision appartient à :
Nicolas Roman 2019-07-17 17:20:32 +02:00
Parent 4b5a020993
révision f3fa182dc7
3 fichiers modifiés avec 0 ajouts et 51 suppressions

Voir le fichier

@ -142,14 +142,6 @@ if (isset($_POST['submit'])) {
break;
}
$updatedVhostConfig = $letsencrypt->setSSLPortVhost($params[1]);
if (!$updatedVhostConfig) {
$errorMessage = "Erreur : La modification de la configuration de l'hôte virtuel a échoué.<br>
Merci de contacter un administrateur pour continuer.";
break;
}
break;
}
}

Voir le fichier

@ -66,24 +66,6 @@ class LetsEncrypt
return false;
}
/**
* add the 443 port to the vhost configuration
* @param string $vhost
* @return boolean
*/
public function setSSLPortVhost($vhost)
{
$cmd = 'web-add.sh update-ssl-vhost-configuration ' . $vhost;
sudoexec($cmd, $data_output, $exec_return);
if ($exec_return == 0) {
return true;
}
return false;
}
/**
* perform a cURL call on the remote resource
* the cURL call follows redirections

Voir le fichier

@ -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"