Use invoke-rc.d if available in postinst maintainer script

Adressing lintian's:

| E: ngcp-panel: maintainer-script-calls-init-script-directly postinst:31
agranig/peering-route
Michael Prokop 13 years ago
parent 23c6d7bf4c
commit a9c05a2825

@ -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