2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 13:29:26 +00:00
fhem-mirror/fhem/contrib/DEBIAN/prerm
betateilchen 56e98c3128 contrib/DEBIAN: use systemd or sysvinit for autostart
git-svn-id: https://svn.fhem.de/fhem/trunk@15697 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2017-12-26 20:36:30 +00:00

19 lines
311 B
Bash
Executable File

#!/bin/bash
# $Id:$
set -e
# detect init system
test=$(stat /sbin/init |grep "File")
re="systemd$"
if [[ $test =~ $re ]]; then
systemctl stop fhem.service
systemctl disable fhem.service
else
if test -f /etc/init.d/fhem; then
/etc/init.d/fhem stop noaptmark
fi
update-rc.d fhem remove
fi