forked from evolix/evoadmin-web
delete methods updating the vhost after cert installation is completed
This commit is contained in:
parent
4b5a020993
commit
f3fa182dc7
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue