From 6365ac617c3749d420300ed906bdb2e437840b3c Mon Sep 17 00:00:00 2001 From: Miraty Date: Thu, 23 Jun 2022 19:19:39 +0200 Subject: [PATCH] Move everything in /srv/niver --- config.ini | 10 +++++----- public/ns/zone-add.php | 2 +- sftpgo-auth.php | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/config.ini b/config.ini index 39f33ae..a12369a 100644 --- a/config.ini +++ b/config.ini @@ -1,5 +1,5 @@ [common] -root_path = "/srv/php/niver" +root_path = "/srv/niver/core" ; Prefix in URL, if any prefix = @@ -9,20 +9,20 @@ knotc_path = "/usr/sbin/knotc" [reg] enabled = true registry = niver.test. -registry_file = "/srv/ns/niver.test.zone" +registry_file = "/srv/niver/reg/niver.test.zone" ttl = 86400 subdomain_regex = "^[a-z0-9]{4,63}$" [ns] enabled = true -knot_zones_path = "/srv/ns" +knot_zones_path = "/srv/niver/ns" [ht] enabled = true ; Path were user's sites will be stored -ht_path = "/srv/ht" +ht_path = "/srv/niver/ht" ; Nginx configuration directory -nginx_config_path = "/etc/nginx/ht" +nginx_config_path = "/srv/niver/nginx" ; Tor configuration directory tor_config_path = "/srv/niver/tor-config" ; Tor keys directory diff --git a/public/ns/zone-add.php b/public/ns/zone-add.php index 711641e..8f277f9 100644 --- a/public/ns/zone-add.php +++ b/public/ns/zone-add.php @@ -31,7 +31,7 @@ if (chmod($knotZonePath, 0660) !== true) knotcConfExec([ "set 'zone[" . $_POST['domain'] . "]'", - "set 'zone[" . $_POST['domain'] . "].template' 'niver'", + "set 'zone[" . $_POST['domain'] . "].template' 'niver-ns'", ]); success("La requête a été traitée."); diff --git a/sftpgo-auth.php b/sftpgo-auth.php index 6da3772..f51c441 100644 --- a/sftpgo-auth.php +++ b/sftpgo-auth.php @@ -3,7 +3,6 @@ require "common/init.php"; $authData = json_decode(file_get_contents("php://input"), true); -$user = json_decode($authData['user'], true); if (checkPassword($authData['username'], $authData['password']) === true) { echo '{"status":1,"username":"' . $authData['username'] . '","permissions":{"/":["*"]}}';