2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00
fhem-mirror/fhem/contrib/DEBIAN/prerm
betateilchen 17019575f6 DEBIAN: fix problems in install scripts
git-svn-id: https://svn.fhem.de/fhem/trunk@15784 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2018-01-05 11:29:16 +00:00

19 lines
316 B
Bash

#!/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