Skip to content

Commit abeb228

Browse files
committed
beaver_control add force stop for stop complete.
1 parent 585a2fb commit abeb228

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bashrc/beaver_control

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Optional arguments:
5757
5858
Require:
5959
action {start|stop|status|restart|condrestart|try-restart|reload|force-reload}
60+
6061
USAGE
6162

6263
exit 1
@@ -163,14 +164,14 @@ stop() {
163164

164165
pstatus () {
165166
if pgrep -f "${PYTHON} ${EXEC}" >/dev/null; then
166-
echo "$PROG" running
167+
#echo "$PROG" running
167168
return 0
168169
fi
169170
return 1
170171
}
171172

172173
forcestop() {
173-
echo "Stopping $PROG"
174+
echo "Force stopping $PROG"
174175
pkill $1 -f "${PYTHON} ${EXEC}"
175176
}
176177

@@ -223,6 +224,7 @@ case "${ACTION}" in
223224
stop)
224225
rh_status_q || exit 0
225226
${ACTION}
227+
pstatus && forcestop -9
226228
;;
227229
restart)
228230
${ACTION}

0 commit comments

Comments
 (0)