fixing indent
Signed-off-by: Mike Leone <mleone896@gmail.com>
| ... | ... |
@@ -43,6 +43,8 @@ prestart() {
|
| 43 | 43 |
start() {
|
| 44 | 44 |
[ -x $exec ] || exit 5 |
| 45 | 45 |
|
| 46 |
+ check_for_cleanup |
|
| 47 |
+ |
|
| 46 | 48 |
if ! [ -f $pidfile ]; then |
| 47 | 49 |
prestart |
| 48 | 50 |
printf "Starting $prog:\t" |
| ... | ... |
@@ -97,6 +99,13 @@ rh_status_q() {
|
| 97 | 97 |
rh_status >/dev/null 2>&1 |
| 98 | 98 |
} |
| 99 | 99 |
|
| 100 |
+ |
|
| 101 |
+check_for_cleanup() {
|
|
| 102 |
+ if [ -f ${pidfile} ]; then
|
|
| 103 |
+ /bin/ps -fp $(cat ${pidfile}) > /dev/null || rm ${pidfile}
|
|
| 104 |
+ fi |
|
| 105 |
+} |
|
| 106 |
+ |
|
| 100 | 107 |
case "$1" in |
| 101 | 108 |
start) |
| 102 | 109 |
rh_status_q && exit 0 |