mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
Fixing .deb files by Alex
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@721 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e2867981df
commit
d83c4fc009
@ -89,6 +89,8 @@ my %models = (
|
|||||||
fs20usr => 'simple',
|
fs20usr => 'simple',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
sub hex2four($);
|
||||||
|
sub four2hex($$);
|
||||||
|
|
||||||
sub
|
sub
|
||||||
FS20_Initialize($)
|
FS20_Initialize($)
|
||||||
|
2
Makefile
2
Makefile
@ -72,8 +72,6 @@ deb:
|
|||||||
rm -rf .f
|
rm -rf .f
|
||||||
make ROOT=`pwd`/.f install
|
make ROOT=`pwd`/.f install
|
||||||
cp -r contrib/DEBIAN .f
|
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 CVS -print | xargs rm -rf
|
||||||
find .f -name example.CVS -print | xargs rm -rf
|
find .f -name example.CVS -print | xargs rm -rf
|
||||||
find .f -name \*.orig -print | xargs rm -f
|
find .f -name \*.orig -print | xargs rm -f
|
||||||
|
@ -1,13 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Don't know how to check presence of fhem in passwd with -e
|
set -e
|
||||||
#set -e
|
|
||||||
|
|
||||||
grep -q fhem /etc/passwd
|
if ! getent passwd fhem >/dev/null; then
|
||||||
e=$?
|
useradd --system --home /var/log/fhem --shell /bin/false fhem
|
||||||
|
|
||||||
if test ! $e = 0; then
|
|
||||||
useradd --system --home /var/log/fhem --shell /bin/false fhem
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R fhem /var/log/fhem /etc/fhem.cfg
|
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
|
set -e
|
||||||
|
|
||||||
if grep -q fhem /etc/passwd; then
|
if grep -q fhem /etc/passwd; then
|
||||||
userdel fhem
|
userdel fhem
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -f /etc/init/fhem.conf; then
|
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
|
fi
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if pgrep fhem.pl >/dev/null; then
|
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
|
fi
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
.f/usr/share/fhem/contrib/getstate/fhem-getstate
|
.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.1
|
||||||
.f/usr/share/fhem/contrib/init-scripts/fhem.2
|
.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/km271.pl
|
||||||
.f/usr/share/fhem/contrib/ks300avg.pl
|
.f/usr/share/fhem/contrib/ks300avg.pl
|
||||||
.f/usr/share/fhem/contrib/rolwzo_not_off.sh
|
.f/usr/share/fhem/contrib/rolwzo_not_off.sh
|
||||||
|
44
contrib/init-scripts/fhem.3
Normal file
44
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.
|
* Trying to make Debian package lintian clean.
|
||||||
* First release
|
* 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
|
||||||
|
4
fhem.pl
4
fhem.pl
@ -160,7 +160,7 @@ my $nextat; # Time when next timer will be triggered.
|
|||||||
my $intAtCnt=0;
|
my $intAtCnt=0;
|
||||||
my %duplicate; # Pool of received msg for multi-fhz/cul setups
|
my %duplicate; # Pool of received msg for multi-fhz/cul setups
|
||||||
my $duplidx=0; # helper for the above pool
|
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 =
|
my $namedef =
|
||||||
"where <name> is either:\n" .
|
"where <name> is either:\n" .
|
||||||
"- a single device name\n" .
|
"- a single device name\n" .
|
||||||
@ -2253,5 +2253,3 @@ ReadingsVal($$$)
|
|||||||
}
|
}
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user