diff --git a/var/www/common.php b/var/www/common.php index 198bf50..900c80f 100644 --- a/var/www/common.php +++ b/var/www/common.php @@ -134,7 +134,8 @@ const COINPAYMENTS_PUBLIC = 'COINPAYMENTS_PUBLIC'; //Coinpayments public API key const COINPAYMENTS_MERCHANT_ID = 'COINPAYMENTS_MERCHANT_ID'; //Coinpayments merchant ID const COINPAYMENTS_IPN_SECRET = 'COINPAYMENTS_IPN_SECRET'; //Coinpayments IPN secret const COINPAYMENTS_FAKE_BUYER_EMAIL = 'daniel@danwin1210.me'; //fixed email used for the required buyer email field -const SITE_NAME = "Daniel's Hosting"; +const SITE_NAME = "Daniel's Hosting"; //globally changes the sites title +const HOME_MOUNT_PATH = '/home'; //mount path of the home directory. Usually /home as own partition or / on a system with no extra home partition function get_onion_v2($pkey) : string { $keyData = openssl_pkey_get_details($pkey); diff --git a/var/www/cron.php b/var/www/cron.php index 17a434d..da2d112 100644 --- a/var/www/cron.php +++ b/var/www/cron.php @@ -130,7 +130,7 @@ while($account=$stmt->fetch(PDO::FETCH_NUM)){ $stmt=$db->query('SELECT users.system_account, disk_quota.quota_files, disk_quota.quota_size, users.id FROM disk_quota INNER JOIN users ON (users.id=disk_quota.user_id) WHERE disk_quota.updated = 1 AND users.id NOT IN (SELECT user_id FROM new_account) AND users.todelete!=1;'); $updated=$db->prepare("UPDATE disk_quota SET updated = 0 WHERE user_id=?;"); while($account=$stmt->fetch(PDO::FETCH_NUM)){ - exec('quotatool -u '. escapeshellarg($account[0]) . ' -i -q ' . escapeshellarg($account[1]) . ' -l ' . escapeshellarg($account[1]) . ' /home'); - exec('quotatool -u '. escapeshellarg($account[0]) . ' -b -q ' . escapeshellarg($account[2]) . ' -l ' . escapeshellarg($account[2]) . ' /home'); + exec('quotatool -u '. escapeshellarg($account[0]) . ' -i -q ' . escapeshellarg($account[1]) . ' -l ' . escapeshellarg($account[1]) . ' ' . HOME_MOUNT_PATH); + exec('quotatool -u '. escapeshellarg($account[0]) . ' -b -q ' . escapeshellarg($account[2]) . ' -l ' . escapeshellarg($account[2]) . ' ' . HOME_MOUNT_PATH); $updated->execute([$account[3]]); }