From 9b2da4944e60465a4fa890a82f001dd21c88ca75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Sun, 15 Nov 2015 15:50:49 +0100 Subject: [PATCH] [fix] Prevent insserv warning when using systemd at package postinst --- debian/postinst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/debian/postinst b/debian/postinst index 3fcaa0dd1..17ccd5b82 100644 --- a/debian/postinst +++ b/debian/postinst @@ -48,13 +48,10 @@ 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 + invoke-rc.d yunohost-api start || exit $? fi #DEBHELPER#