Cross-platform restart of Apache
- by l0b0
I'd like to have a single command that'll restart Apache on any *nix OS. Currently I'm working with Ubuntu, which has
/usr/sbin/apache2ctl
/usr/sbin/service
no apachectl
no httpd
and Scientific Linux CERN 5, which has
/usr/sbin/apachectl
/etc/init.d/httpd
no apache2ctl
no service
I'd like to avoid using a hack like which service 2>/dev/null || which /etc/init.d/httpd