diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 59ca653f..b8a45d83 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,8 +13,8 @@ error_reporting(-1); 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 2456479b..01f10c22 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); + 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) {
isset($words[3]) ? preg_replace('/,$/', '', $words[3]) : '', 'uptime' => isset($words[5]) ? $words[5] : '', ); + $words = preg_split("/\s+/", $status_p); + $data_p = array( + 'name' => isset($words[0]) ? $words[0] : '', + 'state' => isset($words[1]) ? $words[1] : '', + 'pid' => isset($words[3]) ? preg_replace('/,$/', '', $words[3]) : '', + 'uptime' => isset($words[5]) ? $words[5] : '', + ); ?>

Daemon overview


-

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.

+ + - + + + + + + + + + + + + - + + +
DaemonContainer Status Pid UptimeInfo Action
php
httpd
httpd
@@ -99,7 +129,7 @@ function run_supervisor_command($command) {

watcherd stderr


'; foreach(preg_split("/((\r?\n)|(\r\n?))/", $output) as $line) { if ( strpos($line, "[ERR]") !== false ) { @@ -120,7 +150,7 @@ function run_supervisor_command($command) {

watcherd stdout


'; foreach(preg_split("/((\r?\n)|(\r\n?))/", $output) as $line) { $pos_info = strpos($line, "[INFO]"); @@ -142,6 +172,47 @@ function run_supervisor_command($command) {
+ + + + + getFooter(); ?>