Delete Tor keys in del-http-onion.php
This commit is contained in:
parent
aef17741e6
commit
b579c57200
2 changed files with 6 additions and 0 deletions
|
@ -35,6 +35,7 @@ systemctl_path = "/usr/bin/systemctl"
|
||||||
certbot_path = "/usr/bin/certbot"
|
certbot_path = "/usr/bin/certbot"
|
||||||
chgrp_path = "/usr/bin/chgrp"
|
chgrp_path = "/usr/bin/chgrp"
|
||||||
cat_path = "/usr/bin/cat"
|
cat_path = "/usr/bin/cat"
|
||||||
|
rm_path = "/usr/bin/rm"
|
||||||
|
|
||||||
sftpgo_group = sftpgo
|
sftpgo_group = sftpgo
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,11 @@ exec(CONF['ht']['sudo_path'] . " " . CONF['ht']['systemctl_path'] . " reload " .
|
||||||
if ($code !== 0)
|
if ($code !== 0)
|
||||||
serverError("Failed to reload Tor.");
|
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
|
// Delete Nginx config
|
||||||
$onion = query('select', 'sites', [
|
$onion = query('select', 'sites', [
|
||||||
'username' => $_SESSION['username'],
|
'username' => $_SESSION['username'],
|
||||||
|
|
Loading…
Reference in a new issue