Line
Link Here
|
0 |
-- apache2.orig 2006-08-30 15:29:17.000000000 +0200 |
0 |
++ apache2 2006-08-30 15:28:22.000000000 +0200 |
Lines 78-83
Link Here
|
78 |
checkconfig || return 1 |
78 |
checkconfig || return 1 |
79 |
ebegin "Stopping apache2" |
79 |
ebegin "Stopping apache2" |
80 |
${APACHE2} ${APACHE2_OPTS} -k stop |
80 |
${APACHE2} ${APACHE2_OPTS} -k stop |
|
|
81 |
# shutdown patch |
82 |
# TODO do "echo" in the gentoo way |
83 |
# TODO extract process path from ${APACHE2} |
84 |
proc="/usr/bin/apache2" |
85 |
for wait in `seq 30 -1 1`; do |
86 |
sleep 1 |
87 |
[[ -z "`pidof ${proc}`" ]] && break |
88 |
[[ ${wait} = "30" ]] && echo -n "\nWaiting for apache to shut down... " |
89 |
echo -n "$wait " |
90 |
done |
91 |
if [[ -n "`pidof ${proc}`" ]]; then |
92 |
echo -n "trying harder " |
93 |
kill -15 `pidof ${proc}` |
94 |
sleep 5 |
95 |
fi |
96 |
if [[ -n "`pidof ${proc}`" ]]; then |
97 |
echo "failed!" |
98 |
false |
99 |
elif [[ "${wait}" != "30" ]]; then |
100 |
echo "success." |
101 |
true |
102 |
else |
103 |
true |
104 |
fi |
81 |
eend $? |
105 |
eend $? |
82 |
} |
106 |
} |