1
|
#!/bin/sh
|
2
|
#
|
3
|
# The command "/etc/init.d/httpd reload" on Fedora actually _restarts_ Apache
|
4
|
# We need to _reload_ it without closing existing connections
|
5
|
|
6
|
APACHE2CTL=/usr/sbin/apachectl
|
7
|
|
8
|
echo -n "Testing Apache config... "
|
9
|
if ! $APACHE2CTL configtest > /dev/null 2>&1; then
|
10
|
$APACHE2CTL configtest || true
|
11
|
echo "[FAILED]"
|
12
|
exit 1
|
13
|
else
|
14
|
echo "[OK]"
|
15
|
fi
|
16
|
echo -n "Reloading Apache config... "
|
17
|
if $APACHE2CTL graceful $2 ; then
|
18
|
echo "[OK]"
|
19
|
else
|
20
|
echo "[FAILED]"
|
21
|
fi
|
22
|
|