forked from hexenmeister/MyFHEM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartfhem
More file actions
33 lines (25 loc) · 673 Bytes
/
startfhem
File metadata and controls
33 lines (25 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
home=/opt/fhem
cd $home
# Start watchdog
#cnt=`ps -ef | grep "watchdogloop" | grep -v grep | wc -l`
#if [ "$cnt" -eq "0" ] ; then
# cnt=`ps -ef | grep "runwatchdog" | grep -v grep | wc -l`
# if [ "$cnt" -eq "0" ] ; then
# #sudo -u fhem ./runwatchdog.sh
# ./runwatchdog.sh
# fi
#fi
sudo -u fhem ./runwatchdog.sh 2>>log/watchdog_err.log
#cnt=`ps -ef | grep "fhem.pl" | grep -v grep | wc -l`
#if [ "$cnt" -eq "0" ] ; then
# echo "Starting fhem..."
# #sudo -u fhem perl fhem.pl fhem.cfg
# perl fhem.pl fhem.cfg
# RETVAL=$?
#else
# echo "fhem is allready running"
# RETVAL=0
#fi
sudo -u fhem ./runfhem.sh 2>>log/watchdog_err.log
#return $RETVAL