Delete Tor keys in del-http-onion.php

This commit is contained in:
Miraty 2022-06-17 00:28:22 +02:00
parent aef17741e6
commit b579c57200
2 changed files with 6 additions and 0 deletions

View file

@ -35,6 +35,7 @@ systemctl_path = "/usr/bin/systemctl"
certbot_path = "/usr/bin/certbot"
chgrp_path = "/usr/bin/chgrp"
cat_path = "/usr/bin/cat"
rm_path = "/usr/bin/rm"
sftpgo_group = sftpgo

View file

@ -49,6 +49,11 @@ exec(CONF['ht']['sudo_path'] . " " . CONF['ht']['systemctl_path'] . " reload " .
if ($code !== 0)
serverError("Failed to reload Tor.");
// Delete Tor keys
exec(CONF['ht']['sudo_path'] . " -u " . CONF['ht']['tor_user'] . " " . CONF['ht']['rm_path'] . " --recursive " . CONF['ht']['tor_keys_path'] . "/" . $_POST['dir'], $output, $code);
if ($code !== 0)
serverError("Failed to delete Tor keys.");
// Delete Nginx config
$onion = query('select', 'sites', [
'username' => $_SESSION['username'],