Fix systemd
This commit is contained in:
parent
fde200fec8
commit
45e8033b20
1 changed files with 5 additions and 5 deletions
|
@ -78,15 +78,15 @@ function checkService() {
|
||||||
local ROOT_COMMAND="systemctl is-active --quiet $SERVICE";
|
local ROOT_COMMAND="systemctl is-active --quiet $SERVICE";
|
||||||
local USER_COMMAND="systemctl --user is-active --quiet $SERVICE";
|
local USER_COMMAND="systemctl --user is-active --quiet $SERVICE";
|
||||||
|
|
||||||
local RESULT=1;
|
local RESULT=0;
|
||||||
|
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
if [ $($USER_COMMAND) ]; then
|
if [ ! $($USER_COMMAND) ]; then
|
||||||
RESULT=0;
|
RESULT=1;
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ $($ROOT_COMMAND) ] || [ $($USER_COMMAND) ]; then
|
if [ ! $($ROOT_COMMAND) ] && [ ! $($USER_COMMAND) ]; then
|
||||||
RESULT=0;
|
RESULT=1;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue