Initial version

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@3 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2007-01-30 12:47:36 +00:00
commit a5b914121c
107 changed files with 14766 additions and 0 deletions

46
contrib/init-scripts/fhem.1 Executable file
View File

@@ -0,0 +1,46 @@
#! /bin/sh -e
#
#
#
# Written by Stefan Manteuffel
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
DAEMON=/usr/local/bin/fhem.pl
PIDFILE=/var/run/fhem.pid
# Arguments to atd
#
ARGS="/etc/FHZ/fhem.cfg"
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
echo "Starting deferred execution scheduler..."
start-stop-daemon -b --start --quiet --pidfile $PIDFILE --startas $DAEMON -- $ARGS
log_end_msg $?
;;
stop)
log_begin_msg "Stopping deferred execution scheduler..."
start-stop-daemon --oknodo --stop --quiet --retry 30 --pidfile $PIDFILE --name fhem.pl
log_end_msg $?
;;
force-reload|restart)
log_begin_msg "Restarting deferred execution scheduler..."
if start-stop-daemon --stop --quiet --retry 30 --pidfile $PIDFILE --name fhem.pl; then
start-stop-daemon -b --start --quiet --pidfile $PIDFILE --startas $DAEMON -- $ARGS
log_end_msg $?
else
log_end_msg 1
fi
;;
*)
echo "Usage: /etc/init.d/fhem.pl {start|stop|restart|force-reload|reload}"
exit 1
;;
esac
exit 0

25
contrib/init-scripts/fhem.2 Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
# by Matthias Bauer
case "$1" in
start)
echo "Starting $0"
fhem.pl /etc/fhem/fhem.conf
;;
stop)
echo "Stopping $0"
killall fhem.pl
;;
status)
cnt=`ps -ef | grep "fhem.pl" | grep -v grep | wc -l`
if [ "$cnt" -eq "0" ] ; then
echo "$0 is not running"
else
echo "$0 is running"
fi
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
esac
exit 0