/dev/null'); if ($act === 'stop') @exec('sudo /usr/bin/systemctl stop snowflake-proxy 2>/dev/null'); if ($act === 'restart')@exec('sudo /usr/bin/systemctl restart snowflake-proxy 2>/dev/null'); $active = trim((string)@shell_exec('systemctl is-active snowflake-proxy 2>/dev/null')) === 'active'; $enabled = trim((string)@shell_exec('systemctl is-enabled snowflake-proxy 2>/dev/null')) === 'enabled'; $pid = (int)trim((string)@shell_exec('systemctl show -p MainPID --value snowflake-proxy 2>/dev/null')); $ver = trim((string)@shell_exec('snowflake-proxy -version 2>/dev/null')); if ($ver === '') $ver = trim((string)@shell_exec("dpkg-query -W -f='\${Version}\n' snowflake-proxy 2>/dev/null")); $flags = ''; $drop = '/etc/systemd/system/snowflake-proxy.service.d/override.conf'; if (is_file($drop)) { $txt = (string)@file_get_contents($drop); if (preg_match('/^ExecStart=.*snowflake-proxy\s+(.*)$/m', $txt, $m)) $flags = trim($m[1]); } $flags_display = $flags !== '' ? $flags : 'defaults'; ?>
= htmlspecialchars($flags_display) ?>Loading…