2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

DEBIAN-triggers: Switched .deb package triggers from sysv to systemd.

git-svn-id: https://svn.fhem.de/fhem/trunk@15687 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
hjr 2017-12-25 16:36:50 +00:00
parent 01d5659f60
commit 5bc17cfbe1
3 changed files with 9 additions and 15 deletions

View File

@ -15,15 +15,11 @@ chown -R fhem:dialout /opt/fhem
# remove repository entry after first installation # remove repository entry after first installation
sed -i /debian.fhem.de/d /etc/apt/sources.list sed -i /debian.fhem.de/d /etc/apt/sources.list
# set up of autostart # set up of autostart (Sysvinit upstart no longer supported)
# Sysvinit; upstart no longer supported ln -s /opt/fhem/contrib/init-scripts/fhem.service /etc/systemd/system/.
systemctl enable fhem
#mkdir -p /etc/init.d # and start the fhem service
cp /opt/fhem/contrib/init-scripts/fhem.3 /etc/init.d/fhem systemctl start fhem
chmod ugo+x /etc/init.d/fhem
update-rc.d fhem defaults
if test -f /etc/init.d/fhem; then
/etc/init.d/fhem start noaptmark
fi
exit 0 exit 0

View File

@ -12,6 +12,6 @@ if test -f /etc/init/fhem.conf; then
rm /etc/init/fhem.conf rm /etc/init/fhem.conf
fi fi
if test -f /etc/init.d/fhem; then if test -f /etc/systemd/system/fhem.service; then
rm /etc/init.d/fhem rm /etc/systemd/system/fhem.service
fi fi

View File

@ -6,9 +6,7 @@ set -e
apt-mark unhold fhem apt-mark unhold fhem
# stop fhem if running # stop fhem if running
if test -f /etc/init.d/fhem; then systemctl stop fhem
/etc/init.d/fhem stop noaptmark
fi
# remove fhem autostart # remove fhem autostart
update-rc.d -f fhem remove systemctl disble fhem