mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-12 16:46:35 +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:
parent
01d5659f60
commit
5bc17cfbe1
@ -15,15 +15,11 @@ chown -R fhem:dialout /opt/fhem
|
||||
# remove repository entry after first installation
|
||||
sed -i /debian.fhem.de/d /etc/apt/sources.list
|
||||
|
||||
# set up of autostart
|
||||
# Sysvinit; upstart no longer supported
|
||||
# set up of autostart (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
|
||||
cp /opt/fhem/contrib/init-scripts/fhem.3 /etc/init.d/fhem
|
||||
chmod ugo+x /etc/init.d/fhem
|
||||
update-rc.d fhem defaults
|
||||
# and start the fhem service
|
||||
systemctl start fhem
|
||||
|
||||
if test -f /etc/init.d/fhem; then
|
||||
/etc/init.d/fhem start noaptmark
|
||||
fi
|
||||
exit 0
|
||||
|
@ -12,6 +12,6 @@ if test -f /etc/init/fhem.conf; then
|
||||
rm /etc/init/fhem.conf
|
||||
fi
|
||||
|
||||
if test -f /etc/init.d/fhem; then
|
||||
rm /etc/init.d/fhem
|
||||
if test -f /etc/systemd/system/fhem.service; then
|
||||
rm /etc/systemd/system/fhem.service
|
||||
fi
|
||||
|
@ -6,9 +6,7 @@ set -e
|
||||
apt-mark unhold fhem
|
||||
|
||||
# stop fhem if running
|
||||
if test -f /etc/init.d/fhem; then
|
||||
/etc/init.d/fhem stop noaptmark
|
||||
fi
|
||||
systemctl stop fhem
|
||||
|
||||
# remove fhem autostart
|
||||
update-rc.d -f fhem remove
|
||||
systemctl disble fhem
|
||||
|
Loading…
x
Reference in New Issue
Block a user