Skip to content

Commit 2fabe06

Browse files
authored
Create sysvinit-conditional
1 parent 9a557ed commit 2fabe06

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sysvinit-conditional

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
#set your sysvinit service here based on service name string
3+
SVC=MyService
4+
#
5+
if [[ -z $(/etc/init.d/$SVC status) ]]
6+
then
7+
echo "$SVC is down..."
8+
else
9+
echo "$SVC is up..."
10+
fi

0 commit comments

Comments
 (0)