deb: Fixing startup problems while installing

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@6925 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-11-09 13:19:57 +00:00
parent 611736a285
commit af68bf9239
4 changed files with 10 additions and 5 deletions

View File

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

View File

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

View File

@@ -1,13 +1,14 @@
#!/bin/sh #!/bin/sh
#set -x
set -e set -e
apt-mark unhold fhem apt-mark unhold fhem
# stop fhem if running # stop fhem if running
if test -f /etc/init.d/fhem; then if test -f /etc/init.d/fhem; then
invoke-rc.d fhem stop /etc/init.d/fhem stop noaptmark
fi fi
# remove fhem autostart # 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 cd /opt/fhem
port=7072 port=7072
if test "$2" != "noaptmark"; then
apt-mark hold fhem > /dev/null apt-mark hold fhem > /dev/null
fi
case "$1" in case "$1" in
'start') 'start')