summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_services.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-05 23:50:01 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-05 23:50:01 +0000
commit3d13f7801a5a2a2d7b97fd309f7ec3c1597232cb (patch)
tree40b573f76b15cb592c12ca7ddfaa9512a6c7b705 /usr/local/www/status_services.php
parentf8e335a3161234d680a0b413eba89b2ec68d6437 (diff)
downloadpfsense-3d13f7801a5a2a2d7b97fd309f7ec3c1597232cb.zip
pfsense-3d13f7801a5a2a2d7b97fd309f7ec3c1597232cb.tar.gz
If a service fails to start (ruh roh) then output to the web browser the error message
Diffstat (limited to 'usr/local/www/status_services.php')
-rwxr-xr-xusr/local/www/status_services.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php
index 286e1c8..d23f80c 100755
--- a/usr/local/www/status_services.php
+++ b/usr/local/www/status_services.php
@@ -76,10 +76,12 @@ if($_GET['restartservice'] == "true") {
mwexec("/sbin/killall $executable_name");
mwexec("/bin/sh /usr/local/etc/rc.d/{$service}.sh");
$status = is_service_running($executable_name);
- if($status == 1)
+ if($status == 1) {
$savemsg = "{$package_name} has been restarted.";
- else
- $savemsg = "There was a error restarting {$package_name}.";
+ } else {
+ $error_message = exec_command("/bin/sh /usr/local/etc/rc.d/{$service}.sh");
+ $savemsg = "There was a error restarting {$package_name}.<p>{$error_message}";
+ }
}
if($_GET['stopservice'] == "true") {
@@ -89,10 +91,12 @@ if($_GET['stopservice'] == "true") {
if($_GET['startservice'] == "true") {
mwexec("/bin/sh /usr/local/etc/rc.d/{$service}.sh");
- if($status == 1)
+ if($status == 1) {
$savemsg = "{$package_name} has been started.";
- else
- $savemsg = "There was a error starting {$package_name}.";
+ } else {
+ $error_message = exec_command("/bin/sh /usr/local/etc/rc.d/{$service}.sh");
+ $savemsg = "There was a error restarting {$package_name}.<p>{$error_message}";
+ }
}
OpenPOWER on IntegriCloud