2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00
fhem-mirror/fhem/contrib/init-scripts/fhem.2
rudolfkoenig 82ba490176 5.3 preparation/changes
git-svn-id: https://svn.fhem.de/fhem/trunk@2027 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-10-27 16:23:09 +00:00

28 lines
429 B
Bash
Executable File

#!/bin/sh
# by Matthias Bauer
cd /opt/fhem
case "$1" in
start)
echo "Starting $0"
perl fhem.pl fhem.cfg
;;
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