<?php require_once dirname(__FILE__) . '/../../../../www/config.php'; use nzedb\db\Settings; $pdo = new Settings(); $DIR = nZEDb_MISC; // Check that Db patch level is current. Also checks nZEDb.xml is valid. \nzedb\utility\Utility::isPatched(); passthru('clear'); $patch = $pdo->getSetting('sqlpatch'); $patch = $patch != '' ? $patch : 0; $delaytimet = $pdo->getSetting('delaytime'); $delaytimet = $delaytimet ? (int) $delaytimet : 2; $nntpproxy = $pdo->getSetting('nntpproxy'); // Search for NNTPProxy session that might be running froma userthreaded.php run. Setup a clean environment to run in. exec("tmux list-session | grep NNTPProxy", $nntpkill); if (count($nntpkill) === 0) { exec("tmux list-session", $sessions); if (count($sessions) === 0) { echo $pdo->log->notice("The above is a notice generated by tmux. \nWhen starting this script, we first check that nntpproxy is not already running in a tmux session. If it is not, the above notice is generated by tmux.\nIt is not an error."); } } else { echo $pdo->log->notice("Found NNTPProxy tmux session and killing it."); exec("tmux kill-session -t NNTPProxy"); } $t = new Tmux(); $tmux = $t->get(); $tmux_session = isset($tmux->tmux_session) ? $tmux->tmux_session : 0; $seq = isset($tmux->sequential) ? $tmux->sequential : 0; $powerline = isset($tmux->powerline) ? $tmux->powerline : 0; $import = isset($tmux->import) ? $tmux->import : 0;
<?php require_once dirname(__FILE__) . '/../../../../www/config.php'; use nzedb\Tmux; use nzedb\db\Settings; use nzedb\utility\Utility; $pdo = new Settings(); $DIR = nZEDb_MISC; // Check that Db patch level is current. Also checks nZEDb.xml is valid. Utility::isPatched(); Utility::clearScreen(); $patch = $pdo->getSetting('sqlpatch'); $patch = $patch != '' ? $patch : 0; $delaytimet = $pdo->getSetting('delaytime'); $delaytimet = $delaytimet ? (int) $delaytimet : 2; $nntpproxy = $pdo->getSetting('nntpproxy'); echo "Starting Tmux...\n"; // Create a placeholder session so tmux commands do not throw server not found errors. exec('tmux new-session -ds placeholder 2>/dev/null'); // Search for NNTPProxy session that might be running from a user threaded.php run. Setup a clean environment to run in. exec("tmux list-session | grep NNTPProxy", $nntpkill); if (count($nntpkill) !== 0) { exec("tmux kill-session -t NNTPProxy"); echo $pdo->log->notice("Found NNTPProxy tmux session and killing it."); } else { exec("tmux list-session", $session); } $t = new Tmux(); $tmux = $t->get(); $tmux_session = isset($tmux->tmux_session) ? $tmux->tmux_session : 0; $seq = isset($tmux->sequential) ? $tmux->sequential : 0;