plugins: make pluginctl service restart verbose

This commit is contained in:
Franco Fichtner 2019-10-01 08:09:43 +02:00
parent 6bb03c1806
commit 9c3cfc58c4
2 changed files with 6 additions and 6 deletions

View File

@ -159,7 +159,7 @@ function service_control_start($name, $extras)
return sprintf(gettext("Could not start service `%s'"), htmlspecialchars($name));
}
return sprintf(gettext('%s has been started.'), htmlspecialchars($name));
return sprintf(gettext("Service `%s' has been started."), htmlspecialchars($name));
}
function service_control_stop($name, $extras)
@ -194,7 +194,7 @@ function service_control_stop($name, $extras)
killbyname($service['name']);
}
return sprintf(gettext("%s has been stopped."), htmlspecialchars($name));
return sprintf(gettext("Service `%s' has been stopped."), htmlspecialchars($name));
}
function service_control_restart($name, $extras)
@ -232,5 +232,5 @@ function service_control_restart($name, $extras)
return sprintf(gettext("Could not restart service `%s'"), htmlspecialchars($name));
}
return sprintf(gettext("%s has been restarted."), htmlspecialchars($name));
return sprintf(gettext("Service `%s' has been restarted."), htmlspecialchars($name));
}

View File

@ -87,13 +87,13 @@ if (isset($opts['h'])) {
$act = !empty($args[1]) ? $args[1] : '';
switch ($act) {
case 'start':
service_control_start($name, array());
echo service_control_start($name, array()) . PHP_EOL;
break;
case 'stop':
service_control_stop($name, array());
echo service_control_stop($name, array()) . PHP_EOL;
break;
case 'restart':
service_control_restart($name, array());
echo service_control_restart($name, array()) . PHP_EOL;
break;
default:
echo "Unknown command `$act'\n";