diff options
Diffstat (limited to 'src/service/util/serviceutil.sh')
-rwxr-xr-x | src/service/util/serviceutil.sh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/service/util/serviceutil.sh b/src/service/util/serviceutil.sh index fa3832b..fcce0b9 100755 --- a/src/service/util/serviceutil.sh +++ b/src/service/util/serviceutil.sh @@ -57,11 +57,12 @@ then elif [ -f $SYSV_SDIR/$2 ]; then case "$1" in - start|stop|reload|restart|condrestart) + start|stop|reload|restart|try-restart|condrestart|reload-or-restart|reload-or-try-restart) $SYSV_SDIR/$2 $1 + exit $? ;; status) - output=`$SYSV_SDIR/$2 status` + output=`LANG=C $SYSV_SDIR/$2 status` if echo "$output" | grep "stopped" > /dev/null 2>&1; then echo "stopped" elif echo "$output" | grep "not running" > /dev/null 2>&1; then @@ -71,16 +72,16 @@ then fi ;; is-enabled) - CUR_RLVL=`runlevel | cut -d " " -f 2` - output=`chkconfig --list tog-pegasus | cut -f $((CUR_RLVL + 2))` - if echo "$output" | grep "on" > /dev/null 2>&1; then + CUR_RLVL=`runlevel | cut -d " " -f 2` + output=`chkconfig --list $2 | cut -f $((CUR_RLVL + 2))` + if echo "$output" | grep "on" > /dev/null 2>&1; then echo "enabled" - elif echo "$output" | grep "off" > /dev/null 2>&1; then + elif echo "$output" | grep "off" > /dev/null 2>&1; then echo "disabled" - fi - ;; + fi + ;; enable) - chkconfig $2 on + chkconfig $2 on ;; disable) chkconfig $2 off |