We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2593b5b commit 0072c81Copy full SHA for 0072c81
bin/v-list-sys-services
@@ -23,8 +23,17 @@ get_srv_state() {
23
proc_name=${2-$1}
24
25
# Check service status
26
- /etc/init.d/$srv status > /dev/null 2>&1
27
- if [ $? -eq 0 ]; then
+ if [ -e "/etc/init.d/$srv" ]; then
+ /etc/init.d/$srv status > /dev/null 2>&1
28
+ status=$?
29
+ else
30
+ status=1
31
+ if [ ! -z "$(service $srv status| grep running)" ]; then
32
+ status=0
33
+ fi
34
35
+
36
+ if [ $status -eq 0 ]; then
37
state='running'
38
39
# Calculate cpu and memory usage
0 commit comments