From 754ac06b8c22399af6b6a71f27f9aa12020ef10f Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Thu, 8 Feb 2024 11:31:58 -0700 Subject: [PATCH] Move semaphore file ssl.reload to spool dir. --- Rocksolid_Light/rslight/scripts/rslight-lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rocksolid_Light/rslight/scripts/rslight-lib.php b/Rocksolid_Light/rslight/scripts/rslight-lib.php index aac3963..ae1c63a 100644 --- a/Rocksolid_Light/rslight/scripts/rslight-lib.php +++ b/Rocksolid_Light/rslight/scripts/rslight-lib.php @@ -1284,7 +1284,7 @@ function get_article_list($thisgroup) function create_node_ssl_cert($pemfile) { - global $CONFIG, $ssldir, $webtmp, $logdir, $config_dir; + global $CONFIG, $ssldir, $webtmp, $logdir, $config_dir, $spooldir; include $config_dir . '/letsencrypt.inc.php'; $logfile = $logdir . '/nntp.log'; $uinfo = posix_getpwnam($CONFIG['webserver_user']); @@ -1295,17 +1295,17 @@ function create_node_ssl_cert($pemfile) file_put_contents($logfile, "\n" . format_log_date() . " Checking " . $letsencrypt['path'] . "fullchain.pem time", FILE_APPEND); if ($ssltime > filectime($pemfile)) { file_put_contents($logfile, "\n" . format_log_date() . " " . $letsencrypt['path'] . "fullchain.pem newer. Reloading cert.", FILE_APPEND); - touch($config_dir . '/ssl.reload'); + touch($spooldir . '/ssl.reload'); } } - if (! file_exists($config_dir . '/ssl.reload')) { + if (! file_exists($spooldir . '/ssl.reload')) { if ((is_file($pemfile)) && (is_file($pubkeyfile)) && (is_file($pubkeytxtfile))) { if (md5_file($pubkeyfile) == md5_file($pubkeytxtfile)) { return; } } } - @unlink($config_dir . '/ssl.reload'); + @unlink($spooldir . '/ssl.reload'); unlink($pemfile); unlink($pubkeyfile); unlink($pubkeytxtfile);