Observer embryo, Maestro done

This commit is contained in:
STEINNI
2026-06-13 13:47:46 +00:00
parent 932b6e4752
commit 26aefd3fe2
45 changed files with 1889 additions and 143 deletions
+26 -6
View File
@@ -1,13 +1,33 @@
#!/bin/sh
cd /opt/p42GodDaemons/GPS/
. /etc/p42/secrets.env
daemon=p42Gps
logfile=gps.log
pid=$(pgrep -f "$daemon")
pid=`ps -ef | grep p42Gps |grep -v grep | awk '{print $2}'`
if [ -z "$pid" ]
then
node p42Gps.js --debug > gps.log 2>&1 &
node "${daemon}.js" --debug > "$logfile" 2>&1 &
pid=$!
sleep 1
if kill -0 "$pid" 2>/dev/null
then
echo ""
echo "$daemon is now running with PID=$pid"
echo ""
else
echo ""
echo "Failed to start $daemon. Check gps.log"
echo ""
fi
else
echo ''
echo 'Already running PID='"$pid"' (use stopGps.sh to stop it)'
echo ''
echo ""
echo "$daemon is already running with PID=$pid"
echo ""
fi