149 |
return |
return |
150 |
fi |
fi |
151 |
if [ -f "/var/lock/subsys/${NAME}" ]; then |
if [ -f "/var/lock/subsys/${NAME}" ]; then |
152 |
if [ -f "/var/run/${NAME}.pid" ]; then |
if [ -s "/var/run/${NAME}.pid" ]; then |
153 |
read kpid < /var/run/${NAME}.pid |
read kpid < /var/run/${NAME}.pid |
154 |
# if checkpid $kpid 2>&1; then |
# if checkpid $kpid 2>&1; then |
155 |
if [ -d "/proc/${kpid}" ]; then |
if [ -d "/proc/${kpid}" ]; then |
210 |
fi |
fi |
211 |
if [ "$RETVAL" -eq "0" ]; then |
if [ "$RETVAL" -eq "0" ]; then |
212 |
count="0" |
count="0" |
213 |
if [ -f "/var/run/${NAME}.pid" ]; then |
if [ -s "/var/run/${NAME}.pid" ]; then |
214 |
read kpid < /var/run/${NAME}.pid |
read kpid < /var/run/${NAME}.pid |
215 |
until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \ |
until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \ |
216 |
[ "$count" -gt "$SHUTDOWN_WAIT" ]; do |
[ "$count" -gt "$SHUTDOWN_WAIT" ]; do |
262 |
start |
start |
263 |
;; |
;; |
264 |
condrestart|try-restart) |
condrestart|try-restart) |
265 |
if [ -f "/var/run/${NAME}.pid" ]; then |
if [ -s "/var/run/${NAME}.pid" ]; then |
266 |
stop |
stop |
267 |
start |
start |
268 |
fi |
fi |
271 |
RETVAL="3" |
RETVAL="3" |
272 |
;; |
;; |
273 |
force-reload) |
force-reload) |
274 |
if [ -f "/var/run/${NAME}.pid" ]; then |
if [ -s "/var/run/${NAME}.pid" ]; then |
275 |
stop |
stop |
276 |
start |
start |
277 |
fi |
fi |
278 |
;; |
;; |
279 |
status) |
status) |
280 |
if [ -f "/var/run/${NAME}.pid" ]; then |
if [ -s "/var/run/${NAME}.pid" ]; then |
281 |
read kpid < /var/run/${NAME}.pid |
read kpid < /var/run/${NAME}.pid |
282 |
if [ -d "/proc/${kpid}" ]; then |
if [ -d "/proc/${kpid}" ]; then |
283 |
log_success_msg "${NAME} (pid ${kpid}) is running..." |
log_success_msg "${NAME} (pid ${kpid}) is running..." |