[fix] Prevent insserv warning when using systemd at package postinst

This commit is contained in:
Jérôme Lebleu 2015-11-15 15:50:49 +01:00
parent b83c7317b3
commit 9b2da4944e

7
debian/postinst vendored
View file

@ -48,14 +48,11 @@ case "$1" in
;;
esac
if [ -x /etc/init.d/yunohost-api ]; then
# Enable and start yunohost-api service for non-systemd system
if [ -x /etc/init.d/yunohost-api ] && [ ! -d /run/systemd/system ]; then
update-rc.d yunohost-api defaults >/dev/null
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
else
invoke-rc.d yunohost-api start || exit $?
fi
fi
#DEBHELPER#