systemd: Convert services (SySv init) to systemctl (systemd) commands

This commit is contained in:
Sebastien Badia
2015-05-13 01:25:10 +02:00
parent 67cf007622
commit 67328ed1a7
5 changed files with 20 additions and 19 deletions

View File

@@ -27,17 +27,17 @@ function moulinette_set($var, $value) {
}
function stop_service() {
exec('sudo service ynh-vpnclient stop');
exec('sudo systemctl stop ynh-vpnclient');
}
function start_service() {
exec('sudo service ynh-vpnclient start', $output, $retcode);
exec('sudo systemctl start ynh-vpnclient', $output, $retcode);
return $retcode;
}
function service_status() {
exec('sudo service ynh-vpnclient status', $output);
exec('sudo systemctl is-active ynh-vpnclient', $output);
return $output;
}