|
@@ -9,6 +9,8 @@ define("INTERNAL_ONION_HTTP_PORT", "9080");
|
|
|
|
|
|
define("HT_PATH", "/srv/ht");
|
|
|
define("MANIVER_PATH", "/usr/local/bin/maniver");
|
|
|
+define("SYSTEMCTL_PATH", "/usr/bin/systemctl");
|
|
|
+define("CERTBOT_PATH", "/usr/bin/certbot");
|
|
|
define("SUDO_PATH", "/usr/bin/sudo");
|
|
|
define("LS_PATH", "/usr/bin/ls");
|
|
|
define("NGINX_CONFIG_PATH", "/etc/nginx/ht"); // Nginx configuration directory
|
|
@@ -30,11 +32,11 @@ function addNiverLog($message, $outputLines, $returnCode = false) {
|
|
|
foreach ($outputLines as $outputLine) {
|
|
|
$logs = $logs . " " . $outputLine . "\n";
|
|
|
}
|
|
|
- file_put_contents(NIVER_PATH . "/niver.log", $logs, FILE_APPEND);
|
|
|
+ file_put_contents(ROOT_PATH . "/niver.log", $logs, FILE_APPEND);
|
|
|
}
|
|
|
|
|
|
function listFsDirs($username) {
|
|
|
- exec(LS_PATH . " --format=single-column -d " . HT_PATH . "/" . $username . "/ht/*/", $absoluteDirs);
|
|
|
+ exec(LS_PATH . " --format=single-column -d " . HT_PATH . "/" . $username . "/*/", $absoluteDirs);
|
|
|
$relativeDirs = false;
|
|
|
foreach ($absoluteDirs as $i => $absoluteDir) {
|
|
|
$tree = explode("/", $absoluteDir); // The last key is NULL
|