[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Factorised code for adding a file in /etc/apache2/conf.d/ and restarting apache ?



On Sunday 06 July 2008, 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

IMO, you should use 

invoke-rc.d apache2 reload || true

Reloading the apache config can fail for various reasons that have 
nothing to do with your package. You should probably not make package 
installation fail because of this.

Cheers,
Stefan


Reply to: