support systemd

This commit is contained in:
Roland Gruber 2015-05-10 08:30:45 +00:00
parent b0664b7131
commit 57045892e9
2 changed files with 10 additions and 6 deletions

View File

@ -99,9 +99,11 @@ if [ "$1" = "configure" ]; then
for server in $restart; do
server=${server%,}
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d $server reload
else
/etc/init.d/$server reload
/usr/sbin/invoke-rc.d $server reload
elif [ -x /usr/sbin/service ]; then
/usr/sbin/service $server reload
elif [ -x /bin/systemctl ]; then
/bin/systemctl ${server}.service reload
fi
done
fi

View File

@ -38,9 +38,11 @@ if [ -f /usr/share/debconf/confmodule ]; then
for server in $restart; do
server=${server%,}
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d $server reload
else
/etc/init.d/$server reload
/usr/sbin/invoke-rc.d $server reload
elif [ -x /usr/sbin/service ]; then
/usr/sbin/service $server reload
elif [ -x /bin/systemctl ]; then
/bin/systemctl ${server}.service reload
fi
done
fi