2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 16:46:35 +00:00

deb: Fixing startup problems while installing

git-svn-id: https://svn.fhem.de/fhem/trunk@6925 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-11-09 13:19:57 +00:00
parent 3d97068018
commit 19fe72b1be
4 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash
set -e
#set -x
if ! getent passwd fhem >/dev/null; then
useradd --system --home /opt/fhem --gid dialout --shell /bin/false fhem
@ -17,6 +18,6 @@ chmod ugo+x /etc/init.d/fhem
update-rc.d fhem defaults
if test -f /etc/init.d/fhem; then
invoke-rc.d fhem start
/etc/init.d/fhem start noaptmark
fi
exit 0

View File

@ -1,5 +1,6 @@
#!/bin/bash
#set -x
set -e # required by lintian
set +e # Don't know how to check presence of fhem in passwd with -e

View File

@ -1,13 +1,14 @@
#!/bin/sh
#set -x
set -e
apt-mark unhold fhem
# stop fhem if running
if test -f /etc/init.d/fhem; then
invoke-rc.d fhem stop
/etc/init.d/fhem stop noaptmark
fi
# remove fhem autostart
update-rc.d fhem remove
update-rc.d -f fhem remove

View File

@ -15,7 +15,9 @@ set -e
cd /opt/fhem
port=7072
apt-mark hold fhem > /dev/null
if test "$2" != "noaptmark"; then
apt-mark hold fhem > /dev/null
fi
case "$1" in
'start')