Use nntp.reload instead of nntp.restart for congruentia.

This commit is contained in:
Retro_Guy 2024-08-18 01:44:14 -07:00
parent 8ebf69f766
commit 095b757bc5
2 changed files with 5 additions and 7 deletions

View File

@ -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";

View File

@ -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";