fixed (tried to) sats.sysd
This commit is contained in:
parent
58001115ce
commit
edd1e8700e
18
sats/sysd
18
sats/sysd
|
@ -22,13 +22,21 @@ while sleep 1; do
|
|||
for i in $SERV_LIST; do
|
||||
|
||||
status="`systemctl is-active $(basename $i)`";
|
||||
serv="`basename $i`";
|
||||
|
||||
test "$status" = "failed" && echo -n "SYSD0" >> $BUF_OUT;
|
||||
test "$status" = "inactive" && echo -n "SYSD1" >> $BUF_OUT;
|
||||
test "$status" = "activating" && echo -n "SYSD2" >> $BUF_OUT;
|
||||
test "$status" = "active" && echo -n "SYSD3" >> $BUF_OUT;
|
||||
if [ "$status" = "failed" ]; then
|
||||
echo -n "SYSD0$serv" >> $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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue