Apache2 on Ubuntu: I don't have installed apachectl
I'm using Ubuntu Server 9.04 and I've installed Apache2 on it.
I want to restart my Apache gracefully but I only can restarting it using this command:
/etc/init.d/apache2 restart
And if I'm not wrong it doesn't have graceful option parameter.
I don't have this command installed:
apachectl
thanks
Update
sudo /etc/init.d/apache2 graceful
* Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}
On Ubuntu apachectl is /usr/sbin/apache2ctl
/etc/init.d/apache2
accepts graceful
parameter. reload
parameter does the same. You can use either:
/etc/init.d/apache2 graceful
or
/etc/init.d/apache2 reload
to pass graceful
parameter to apache2ctl
Edit:
It exists. look at source of /etc/init.d/apache2
:
graceful | reload | force-reload)
if ! $APACHE2CTL configtest > /dev/null 2>&1; then
$APACHE2CTL configtest || true
log_end_msg 1
exit 1
fi
log_daemon_msg "Reloading web server config" "apache2"
if pidof_apache > /dev/null ; then
if $APACHE2CTL graceful $2 ; then
log_end_msg 0
else
log_end_msg 1
fi
fi
;;