From 095b757bc59a3e748cdb4e4bd4b58f8bb27f5a0b Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sun, 18 Aug 2024 01:44:14 -0700 Subject: [PATCH] Use nntp.reload instead of nntp.restart for congruentia. --- Rocksolid_Light/rslight/scripts/nntp-ssl.php | 9 ++++----- Rocksolid_Light/rslight/scripts/nntp.php | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Rocksolid_Light/rslight/scripts/nntp-ssl.php b/Rocksolid_Light/rslight/scripts/nntp-ssl.php index 687625b..5efa2f4 100755 --- a/Rocksolid_Light/rslight/scripts/nntp-ssl.php +++ b/Rocksolid_Light/rslight/scripts/nntp-ssl.php @@ -9,11 +9,11 @@ posix_kill($parent_pid, SIGTERM); exit(); } - if (file_exists($config_dir . "/nntp.restart")) { - clearstatcache(true, $config_dir . "/nntp.restart"); + if (file_exists($config_dir . "/nntp.reload")) { + clearstatcache(true, $config_dir . "/nntp.reload"); $parent_pid = file_get_contents($lockfile); posix_kill($parent_pid, SIGTERM); - unlink($config_dir . "/nntp.restart"); + unlink($config_dir . "/nntp.reload"); } /** * Listens for requests and forks on each connection @@ -49,9 +49,8 @@ function server_loop($address, $port) { GLOBAL $__server_listening; - GLOBAL $CONFIG, $logdir, $lockdir, $webserver_uid, $webserver_gid, $installed_path, $config_path, $groupconfig, $workpath, $path, $spooldir, $ssldir, $nntp_group, $auth_ok; + GLOBAL $CONFIG, $logdir, $lockfile, $webserver_uid, $webserver_gid, $installed_path, $config_path, $groupconfig, $workpath, $path, $spooldir, $ssldir, $nntp_group, $auth_ok; $logfile = $logdir . '/nntp.log'; - $lockfile = $lockdir . '/rslight-nntp-ssl.lock'; $pid = file_get_contents($lockfile); if (posix_getsid($pid) === false || ! is_file($lockfile)) { print "Starting Rocksolid Light NNTP Server...\n"; diff --git a/Rocksolid_Light/rslight/scripts/nntp.php b/Rocksolid_Light/rslight/scripts/nntp.php index 13a2947..11e7854 100755 --- a/Rocksolid_Light/rslight/scripts/nntp.php +++ b/Rocksolid_Light/rslight/scripts/nntp.php @@ -51,9 +51,8 @@ function server_loop($address, $port) { GLOBAL $__server_listening; - GLOBAL $CONFIG, $logdir, $lockdir, $webserver_uid, $webserver_gid, $installed_path, $config_path, $groupconfig, $workpath, $path, $spooldir, $nntp_group, $auth_ok; + GLOBAL $CONFIG, $logdir, $lockfile, $webserver_uid, $webserver_gid, $installed_path, $config_path, $groupconfig, $workpath, $path, $spooldir, $nntp_group, $auth_ok; $logfile = $logdir . '/nntp.log'; - $lockfile = $lockdir . '/rslight-nntp.lock'; $pid = file_get_contents($lockfile); if (posix_getsid($pid) === false || ! is_file($lockfile)) { print "Starting Rocksolid Light NNTP Server...\n";