2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00
fhem-mirror/fhem/contrib/DEBIAN/prerm

19 lines
316 B
Plaintext
Raw Normal View History

#!/bin/bash
# $Id$
set -e
# detect init system
test=$(stat /sbin/init |grep "/sbin/init")
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