23 lines
461 B
Bash
Executable File
23 lines
461 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# The command "/etc/init.d/httpd reload" on Fedora actually _restarts_ Apache
|
|
# We need to _reload_ it without closing existing connections
|
|
|
|
APACHE2CTL=/usr/sbin/apachectl
|
|
|
|
echo -n "Testing Apache config... "
|
|
if ! $APACHE2CTL configtest > /dev/null 2>&1; then
|
|
$APACHE2CTL configtest || true
|
|
echo "[FAILED]"
|
|
exit 1
|
|
else
|
|
echo "[OK]"
|
|
fi
|
|
echo -n "Reloading Apache config... "
|
|
if $APACHE2CTL graceful $2 ; then
|
|
echo "[OK]"
|
|
else
|
|
echo "[FAILED]"
|
|
fi
|
|
|