From 17019575f6b56f2cac01ed4286e7b64c43183f42 Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Fri, 5 Jan 2018 11:29:16 +0000 Subject: [PATCH] DEBIAN: fix problems in install scripts git-svn-id: https://svn.fhem.de/fhem/trunk@15784 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DEBIAN/postinst | 2 +- fhem/contrib/DEBIAN/prerm | 2 +- fhem/contrib/init-scripts/fhem.service | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fhem/contrib/DEBIAN/postinst b/fhem/contrib/DEBIAN/postinst index e992d92a7..438413a4a 100644 --- a/fhem/contrib/DEBIAN/postinst +++ b/fhem/contrib/DEBIAN/postinst @@ -19,7 +19,7 @@ sed -i /debian.fhem.de/d /etc/apt/sources.list # upstart: not supported # detect init system -test=$(stat /sbin/init |grep "File") +test=$(stat /sbin/init |grep "/sbin/init") re="systemd$" if [[ $test =~ $re ]]; diff --git a/fhem/contrib/DEBIAN/prerm b/fhem/contrib/DEBIAN/prerm index 896c80ef2..862bd3448 100644 --- a/fhem/contrib/DEBIAN/prerm +++ b/fhem/contrib/DEBIAN/prerm @@ -4,7 +4,7 @@ set -e # detect init system -test=$(stat /sbin/init |grep "File") +test=$(stat /sbin/init |grep "/sbin/init") re="systemd$" if [[ $test =~ $re ]]; then diff --git a/fhem/contrib/init-scripts/fhem.service b/fhem/contrib/init-scripts/fhem.service index 375e4e76c..439880da5 100644 --- a/fhem/contrib/init-scripts/fhem.service +++ b/fhem/contrib/init-scripts/fhem.service @@ -13,8 +13,11 @@ WorkingDirectory=/opt/fhem ExecStart=/usr/bin/perl fhem.pl fhem.cfg #ExecStart=/usr/bin/perl fhem.pl configDB # uncomment next two lines if auto-restart desired -#Restart=always -#RestartSec=5 + +# please select restart options according your needs +# Restart=on-abnormal # uncomment for crash and watchdog event recovery only (keeps shutdown working) +# Restart=always # alternativly uncomment this line for recover always +# RestartSec=5 # uncomment always if restart required! [Install] WantedBy=multi-user.target