Skip to content

Commit

Permalink
adding pid file check
Browse files Browse the repository at this point in the history
  • Loading branch information
Lozy committed Jan 17, 2017
1 parent 47ce757 commit d8c1729
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions script/sockctl
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ stop_daemon_all(){
start-stop-daemon --stop --quiet --oknodo --pidfile $PID_FILE \
--exec $DAEMON -- -f ${CONFIG_FILE} -p $PID_FILE -N ${Start_Process} ${Sockd_Opts}

[ -n "$( ps aux | awk '{print $2}'| grep "^$(cat $PID_FILE)$" )" ] && \
echo -e "${CRED}Danted Server [ Stop Failed ] ${CEND}" || \
echo -e "${CYELLOW}Danted Server [ Stop Done ] ${CEND}"
if [ -s $PID_FILE ];then
[ -n "$( ps aux | awk '{print $2}'| grep "^$(cat $PID_FILE)$" )" ] && \
echo -e "${CRED}Danted Server [ Stop Failed ] ${CEND}" || \
echo -e "${CYELLOW}Danted Server [ Stop Done ] ${CEND}"
fi
}

force_stop_daemon(){
Expand Down

0 comments on commit d8c1729

Please sign in to comment.