mirror of
https://github.com/fhem/fhem-mirror.git
synced 2024-11-22 02:59:49 +00:00
Fixing .deb files by Alex
git-svn-id: https://svn.fhem.de/fhem/trunk@721 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
917748d3bd
commit
cd84f2ad09
@ -89,6 +89,8 @@ my %models = (
|
||||
fs20usr => 'simple',
|
||||
);
|
||||
|
||||
sub hex2four($);
|
||||
sub four2hex($$);
|
||||
|
||||
sub
|
||||
FS20_Initialize($)
|
||||
|
@ -72,8 +72,6 @@ deb:
|
||||
rm -rf .f
|
||||
make ROOT=`pwd`/.f install
|
||||
cp -r contrib/DEBIAN .f
|
||||
mkdir .f/etc/init
|
||||
cp contrib/init-scripts/fhem.upstart .f/etc/init/fhem.conf
|
||||
find .f -name CVS -print | xargs rm -rf
|
||||
find .f -name example.CVS -print | xargs rm -rf
|
||||
find .f -name \*.orig -print | xargs rm -f
|
||||
|
@ -1,13 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Don't know how to check presence of fhem in passwd with -e
|
||||
#set -e
|
||||
set -e
|
||||
|
||||
grep -q fhem /etc/passwd
|
||||
e=$?
|
||||
|
||||
if test ! $e = 0; then
|
||||
useradd --system --home /var/log/fhem --shell /bin/false fhem
|
||||
if ! getent passwd fhem >/dev/null; then
|
||||
useradd --system --home /var/log/fhem --shell /bin/false fhem
|
||||
fi
|
||||
|
||||
chown -R fhem /var/log/fhem /etc/fhem.cfg
|
||||
initctl start fhem
|
||||
|
||||
#set up of autostart
|
||||
if test -x /sbin/initctl; then
|
||||
# upstart
|
||||
mkdir -p /etc/init
|
||||
cp /usr/share/fhem/contrib/init-scripts/fhem.upstart /etc/init/fhem.conf
|
||||
initctl start fhem
|
||||
else
|
||||
# Sysvinit
|
||||
mkdir -p /etc/init.d
|
||||
cp /usr/share/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
|
||||
fi
|
||||
|
@ -3,8 +3,13 @@
|
||||
set -e
|
||||
|
||||
if grep -q fhem /etc/passwd; then
|
||||
userdel fhem
|
||||
userdel fhem
|
||||
fi
|
||||
|
||||
if test -f /etc/init/fhem.conf; then
|
||||
rm /etc/init/fhem.conf
|
||||
rm /etc/init/fhem.conf
|
||||
fi
|
||||
if test -f /etc/init.d/fhem; then
|
||||
update-rc.d fhem remove
|
||||
rm /etc/init.d/fhem
|
||||
fi
|
||||
|
@ -1,6 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if pgrep fhem.pl >/dev/null; then
|
||||
initctl stop fhem
|
||||
if test -x /sbin/initctl; then
|
||||
initctl stop fhem
|
||||
else
|
||||
invoke-rc.d fhem stop
|
||||
fi
|
||||
fi
|
||||
|
@ -10,6 +10,7 @@
|
||||
.f/usr/share/fhem/contrib/getstate/fhem-getstate
|
||||
.f/usr/share/fhem/contrib/init-scripts/fhem.1
|
||||
.f/usr/share/fhem/contrib/init-scripts/fhem.2
|
||||
.f/usr/share/fhem/contrib/init-scripts/fhem.3
|
||||
.f/usr/share/fhem/contrib/km271.pl
|
||||
.f/usr/share/fhem/contrib/ks300avg.pl
|
||||
.f/usr/share/fhem/contrib/rolwzo_not_off.sh
|
||||
|
44
fhem/contrib/init-scripts/fhem.3
Normal file
44
fhem/contrib/init-scripts/fhem.3
Normal file
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# description: Start or stop the fhem server
|
||||
# Added by Alex Peuchert
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: fhem.pl
|
||||
# Required-Start: $local_fs $remote_fs
|
||||
# Required-Stop: $local_fs $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: FHEM server
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
|
||||
fhz=/usr/bin/fhem.pl
|
||||
conf=/etc/fhem.cfg
|
||||
port=7072
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
echo "Starting fhem..."
|
||||
$fhz $conf
|
||||
RETVAL=$?
|
||||
;;
|
||||
'stop')
|
||||
echo "Stopping fhem..."
|
||||
$fhz $port "shutdown"
|
||||
RETVAL=$?
|
||||
;;
|
||||
'status')
|
||||
cnt=`ps -ef | grep "fhem.pl" | grep -v grep | wc -l`
|
||||
if [ "$cnt" -eq "0" ] ; then
|
||||
echo "fhem is not running"
|
||||
else
|
||||
echo "fhem is running"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 { start | stop | status }"
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
@ -1,6 +1,14 @@
|
||||
fhem (4.10)
|
||||
fhem (5.0-1) unstable; urgency=low
|
||||
|
||||
* Making .dep compatible for Debian Squeeze and for Ubuntu Lucid
|
||||
init script is copied from contrib/initscripts
|
||||
prerm deletes the initscripts
|
||||
|
||||
-- Alex Peuchert <fhem@peuchert.de> Thu, 30 Sep 2010 11:00:00 +0200
|
||||
|
||||
fhem (4.10) unstable; urgency=low
|
||||
|
||||
* Trying to make Debian package lintian clean.
|
||||
* First release
|
||||
|
||||
-- Rudolf Koenig <r.koenig@koeniglich.de> 2010-08-01
|
||||
-- Rudolf Koenig <r.koenig@koeniglich.de> Sun, 1 Aug 2010 00:00:00 +0200
|
||||
|
@ -160,7 +160,7 @@ my $nextat; # Time when next timer will be triggered.
|
||||
my $intAtCnt=0;
|
||||
my %duplicate; # Pool of received msg for multi-fhz/cul setups
|
||||
my $duplidx=0; # helper for the above pool
|
||||
my $cvsid = '$Id: fhem.pl,v 1.110 2010-08-14 10:35:12 rudolfkoenig Exp $';
|
||||
my $cvsid = '$Id: fhem.pl,v 1.111 2010-09-30 13:12:27 rudolfkoenig Exp $';
|
||||
my $namedef =
|
||||
"where <name> is either:\n" .
|
||||
"- a single device name\n" .
|
||||
@ -2253,5 +2253,3 @@ ReadingsVal($$$)
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user