mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-12 14:47:26 +00:00
contrib/DEBIAN: fixed package scripts
git-svn-id: https://svn.fhem.de/fhem/trunk@6738 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e18aee8631
commit
13ae285ff5
@ -1,5 +1,4 @@
|
||||
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
@ -9,18 +8,15 @@ 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
|
||||
#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
|
||||
|
||||
if test -f /etc/init.d/fhem; then
|
||||
invoke-rc.d fhem start
|
||||
fi
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e # required by lintian
|
||||
set +e # Don't know how to check presence of fhem in passwd with -e
|
||||
|
@ -2,8 +2,12 @@
|
||||
|
||||
set -e
|
||||
|
||||
apt-mark unhold fhem
|
||||
|
||||
# stop fhem if running
|
||||
invoke-rc.d fhem stop
|
||||
if test -f /etc/init.d/fhem; then
|
||||
invoke-rc.d fhem stop
|
||||
fi
|
||||
|
||||
# remove fhem autostart
|
||||
update-rc.d fhem remove
|
||||
|
Loading…
x
Reference in New Issue
Block a user