2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00
betateilchen 937b9a0c14 contrib/DEBIAN: modified some package script
- remove support for upstart
- stop running fhem process in prerm before userdel
- prevent fhem package from being overwrittten by apt-get-upgrade

git-svn-id: https://svn.fhem.de/fhem/trunk@6712 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2014-10-08 18:17:37 +00:00

27 lines
518 B
Plaintext

#!/bin/sh
set -e
if ! getent passwd fhem >/dev/null; then
useradd --system --home /opt/fhem --gid dialout --shell /bin/false fhem
fi
chown -R fhem:root /opt/fhem
# prevent package fhem from being
# upgraded by apt-get upgrade
apt-mark hold fhem
echo "fhem hold" | dpkg --set-selections
# set up of autostart
# Sysvinit; upstart no longer supported
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
invoke-rc.d fhem start