|
@@ -88,19 +88,19 @@ function htDeleteSite($address, $type) {
|
|
output(500, 'Failed to delete Tor configuration.');
|
|
output(500, 'Failed to delete Tor configuration.');
|
|
|
|
|
|
// Reload Tor
|
|
// Reload Tor
|
|
- exec(CONF['ht']['sudo_path'] . ' ' . CONF['ht']['tor_reload_cmd'], $output, $code);
|
|
|
|
|
|
+ exec(CONF['ht']['sudo_path'] . ' ' . CONF['ht']['tor_reload_cmd'], result_code: $code);
|
|
if ($code !== 0)
|
|
if ($code !== 0)
|
|
output(500, 'Failed to reload Tor.');
|
|
output(500, 'Failed to reload Tor.');
|
|
|
|
|
|
// Delete Tor keys
|
|
// Delete Tor keys
|
|
- exec(CONF['ht']['sudo_path'] . ' -u ' . CONF['ht']['tor_user'] . ' ' . CONF['ht']['rm_path'] . ' -r ' . CONF['ht']['tor_keys_path'] . '/' . $_SESSION['id'] . '/' . $dir, $output, $code);
|
|
|
|
|
|
+ exec(CONF['ht']['sudo_path'] . ' -u ' . CONF['ht']['tor_user'] . ' ' . CONF['ht']['rm_path'] . ' -r ' . CONF['ht']['tor_keys_path'] . '/' . $_SESSION['id'] . '/' . $dir, result_code: $code);
|
|
if ($code !== 0)
|
|
if ($code !== 0)
|
|
output(500, 'Failed to delete Tor keys.');
|
|
output(500, 'Failed to delete Tor keys.');
|
|
}
|
|
}
|
|
|
|
|
|
if ($type === 'dns') {
|
|
if ($type === 'dns') {
|
|
// Delete Let's Encrypt certificate
|
|
// Delete Let's Encrypt certificate
|
|
- exec(CONF['ht']['sudo_path'] . ' ' . CONF['ht']['certbot_path'] . ' delete --quiet --cert-name ' . $address, $output, $code);
|
|
|
|
|
|
+ exec(CONF['ht']['sudo_path'] . ' ' . CONF['ht']['certbot_path'] . ' delete --quiet --cert-name ' . $address, result_code: $code);
|
|
if ($code !== 0)
|
|
if ($code !== 0)
|
|
output(500, 'Certbot failed to delete the Let\'s Encrypt certificate.');
|
|
output(500, 'Certbot failed to delete the Let\'s Encrypt certificate.');
|
|
}
|
|
}
|