Use invoke-rc.d interface in postinst maintainer script

Make sure we don't invoke services if that's unwanted.
mr3.2.1
Michael Prokop 12 years ago
parent a165521a1c
commit abe9de69a2
Notes: Sipwise Jenkins Builder 11 years ago
jenkins_trigger: false

@ -27,8 +27,12 @@ if [ -e /etc/apache2/sites-enabled/default ]; then
fi
# reload perl and/or apache modules
if [ -x /etc/init.d/apache2 ] ; then
/etc/init.d/apache2 restart || true
if [ -x /etc/init.d/apache2 ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d apache2 restart || true
else
/etc/init.d/apache2 restart || true
fi
fi
exit 0

Loading…
Cancel
Save