From 91ef8c82d1f25621a1172e534dc3c4dddae83196 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 29 Sep 2023 21:56:26 -0700 Subject: [PATCH] Validate that the fcgiwrap server is running --- lang/en | 2 ++ virtual_feature.pl | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/lang/en b/lang/en index 0e833c9..ace4281 100644 --- a/lang/en +++ b/lang/en @@ -459,6 +459,8 @@ feat_clonealias=.. not necessary for alias domains feat_eclonefind=.. could not find new virtual host named $1 after cloning! feat_modifyproxy=Modifying proxy destination .. feat_module=Nginx Webserver (for virtual host) +feat_evalidatefcgiwrapinit=No FCGIwrap server bootup action exists! +feat_evalidatefcgiwraprun=The FCGIwrap server for this domain is not running fcgid_ecmd=No PHP command found! fcgid_ecmdexec=PHP command $1 could not be executed : $2 diff --git a/virtual_feature.pl b/virtual_feature.pl index ddaaedd..217b167 100644 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -997,6 +997,19 @@ sub feature_validate } } +# Make sure fcgiwrap server is running +if ($d->{'nginx_fcgiwrap_port'}) { + &foreign_require("init"); + my $name = &init_script_fcgiwrap_name($d); + my $st = &init::action_status($name); + if (!$st) { + return $text{'feat_evalidatefcgiwrapinit'}; + } + elsif (!&init::status_action($name)) { + return $text{'feat_evalidatefcgiwraprun'}; + } + } + return undef; }