fixed (tried to) sats.sysd

This commit is contained in:
xdrm-brackets 2018-01-28 19:08:11 +01:00
parent 58001115ce
commit edd1e8700e
1 changed files with 13 additions and 5 deletions

View File

@ -22,13 +22,21 @@ while sleep 1; do
for i in $SERV_LIST; do for i in $SERV_LIST; do
status="`systemctl is-active $(basename $i)`"; status="`systemctl is-active $(basename $i)`";
serv="`basename $i`";
test "$status" = "failed" && echo -n "SYSD0" >> $BUF_OUT; if [ "$status" = "failed" ]; then
test "$status" = "inactive" && echo -n "SYSD1" >> $BUF_OUT; echo -n "SYSD0$serv" >> $BUF_OUT;
test "$status" = "activating" && echo -n "SYSD2" >> $BUF_OUT;
test "$status" = "active" && echo -n "SYSD3" >> $BUF_OUT;
echo "`basename $i`" >> $BUF_OUT; elif [ "$status" = "inactive" ]; then
echo -n "SYSD1$serv" >> $BUF_OUT;
elif [ "$status" = "activating" ]; then
echo -n "SYSD2$serv" >> $BUF_OUT;
elif [ "$status" = "active" ]; then
echo -n "SYSD3$serv" >> $BUF_OUT;
fi;
done; done;