mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
71fe020f84
git-svn-id: https://svn.fhem.de/fhem/trunk@3 2b470e98-0d58-463d-a4d8-8e2adae1ed80
26 lines
421 B
Bash
Executable File
26 lines
421 B
Bash
Executable File
#!/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
|