diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 59ca653fb..b8a45d830 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,8 +13,8 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v3.0.0-beta-0.3'; -$DEVILBOX_DATE = '2023-01-02'; +$DEVILBOX_VERSION = 'v3.0.0-beta-0.4'; +$DEVILBOX_DATE = '2023-01-30'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/.devilbox/www/htdocs/cnc.php b/.devilbox/www/htdocs/cnc.php index 2456479bd..01f10c22f 100644 --- a/.devilbox/www/htdocs/cnc.php +++ b/.devilbox/www/htdocs/cnc.php @@ -2,31 +2,39 @@ authPage(); ?> exec('supervisorctl -c ' . $supervisor_config_file . ' ' . $command); +function run_supervisor_command($host, $command) { + if ($host == 'httpd') { + $supervisor_config_file = '/tmp/supervisorctl.conf'; + $port = getenv('SVCTL_LISTEN_PORT'); + $user = getenv('SVCTL_USER'); + $pass = getenv('SVCTL_PASS'); + + $content = "[supervisorctl]\n"; + $content .= "serverurl=http://httpd:" . $port . "\n"; + $content .= "username=" . $user . "\n"; + $content .= "password=" . $pass . "\n"; + + $fp = fopen($supervisor_config_file, 'w'); + fwrite($fp, $content); + fclose($fp); + + return loadClass('Helper')->exec('supervisorctl -c ' . $supervisor_config_file . ' ' . $command); + } else if ($host == 'php') { + return loadClass('Helper')->exec('sudo supervisorctl ' . $command); + } } ?> -redirect('/cnc.php'); -} +redirect('/cnc.php'); + } else if ( isset($_POST['php-fpm']) && $_POST['php-fpm'] == 'reload' ) { + run_supervisor_command('php', 'restart php-fpm'); + loadClass('Helper')->redirect('/cnc.php'); + } ?> @@ -46,8 +54,9 @@ function run_supervisor_command($command) {
If you made any changes to vhost settings (vhost-gen templates or backend configuration) or to the webserver configuration itself, you can trigger a manual reload of watcherd here to apply them. No need to restart the Docker Compose stack.
| Daemon | +Container | Status | Pid | Uptime | +Info | Action | |
|---|---|---|---|---|---|---|---|
| + | |
+ php | ++ | + | + | + | + |
|
+ httpd | + | |||||
| + | |
+ httpd | + |