Re: Factorised code for adding a file in /etc/apache2/conf.d/ and restarting apache ?
hello,
On Sun, Jul 06, 2008 at 10:19:34PM +0900, Charles Plessy wrote:
> if [ -x /etc/init.d/apache2 ]; then
> if which invoke-rc.d >/dev/null 2>&1; then
> invoke-rc.d apache2 reload
> else
> /etc/init.d/apache2 reload
> fi
> fi
why not something simple like
/etc/init.d/apache2 reload || error_function
this will work in most cases and all the tests can be done in
error_function.
regards
--
Marc Chantreux
BibLibre, expert en logiciels libres pour l'info-doc
http://biblibre.com
Reply to: