#!/usr/bin/env php /dev/null'; $output = trim(shell_exec($command)); if (empty($output)) { echo block( 'wireguard_'.$iface, [ 'full_text' => pspan($name, '#ccc', '#222'), 'color' => color('warning'), ] ); if (getenv('BLOCK_BUTTON') === '1') { $command = 'sudo wg-quick up '.escapeshellarg($iface); shell_exec($command); } } else { echo block( 'wireguard_'.$iface, [ 'full_text' => pspan($name, '#333', color('normal')), 'color' => color('normal'), ] ); if (getenv('BLOCK_BUTTON') === '1') { $command = 'sudo wg-quick down '.escapeshellarg($iface); shell_exec($command); } }