summaryrefslogtreecommitdiffstats
path: root/etc/inc/service-utils.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/service-utils.inc')
-rw-r--r--etc/inc/service-utils.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 4c09899..57e5472 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -114,6 +114,9 @@ function stop_service($name) {
global $config;
global $rcfileprefix;
+ if (empty($name))
+ return;
+
if ($config['installedpackages']['service']) {
foreach($config['installedpackages']['service'] as $service) {
if(strtolower($service['name']) == strtolower($name)) {
@@ -147,6 +150,9 @@ function stop_service($name) {
function restart_service($name) {
global $config;
+ if (empty($name))
+ return;
+
stop_service($name);
start_service($name);
OpenPOWER on IntegriCloud