#!/bin/bash # Descrip : PushClient Service Management Process Script. # Date : 2018-08-09 15:29:33 # Author : beytagh.stark (beytagh.stark@gmail.com) # Link : https://www.gov-cn.cn/ # Version : Ver 1.0
start() { echo"Starting PushClient Service." $NohupExec$MonoExec$PushClient > /dev/null 2>&1 & retval=$? if [ $retval -eq 0 ]; then echo"Start PushClient Service Success." else echo"Start PushClient Service Fail." pkill -f $PushName fi }
stop() { retval=`ps -ef |grep "$PushName" |grep -v "grep" |wc -l` if [ $retval -eq 0 ]; then echo"PushClient Service Not Running." else echo"Stopping PushClient Service." pkill -f $PushName retval=$? if [ $retval -eq 0 ]; then echo"Stop PushClient Service Success." else echo"Stop PushClient Service Fail." fi fi }
status() { retval=`ps -ef |grep "$PushName" |grep -v "grep" |wc -l` if [ $retval -eq 0 ]; then echo"PushClient Service is Running." else echo"PushClient Service not Running." fi }