finished actions => handlers refacto, small bux fix in maestro => Test maestro1 OK
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ import {
|
||||
positionAt,
|
||||
needsPrismRefresh,
|
||||
advanceAgentSegment,
|
||||
} from './actions/arena/worldline.js'
|
||||
} from './handlers/arena/worldline.js'
|
||||
|
||||
export class gpsServer {
|
||||
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ import {RedisConnexion} from '../redisConnexion.js'
|
||||
import { busReplyRoute } from '../bus/publishActionReply.js'
|
||||
import {configHelper} from '../configHelper.js'
|
||||
import {gpsServer} from './gpsServer.js'
|
||||
import * as systemMesh from './actions/system/index.js'
|
||||
import * as arenaMesh from './actions/arena/index.js'
|
||||
import * as systemMesh from './handlers/system/index.js'
|
||||
import * as arenaMesh from './handlers/arena/index.js'
|
||||
|
||||
const meshModules = {
|
||||
system: systemMesh,
|
||||
|
||||
+13
-3
@@ -1,5 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
# shellcheck source=../lib/resolveConfigPath.sh
|
||||
. "$SCRIPT_DIR/../lib/resolveConfigPath.sh"
|
||||
|
||||
CONFIG="$(resolveConfigPath "$SCRIPT_DIR" "${1:-${CONFIG:-../config.json}}")"
|
||||
|
||||
set -a
|
||||
. /etc/p42/secrets.env
|
||||
set +a
|
||||
@@ -7,12 +13,16 @@ set +a
|
||||
daemon=p42Gps
|
||||
logfile=gps.log
|
||||
|
||||
if [ ! -f "$CONFIG" ]; then
|
||||
echo "Config file not found: $CONFIG" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pid=$(pgrep -f "$daemon")
|
||||
|
||||
if [ -z "$pid" ]
|
||||
then
|
||||
node "${daemon}.js" --debug > "$logfile" 2>&1 &
|
||||
node "${daemon}.js" --config "$CONFIG" --debug > "$logfile" 2>&1 &
|
||||
pid=$!
|
||||
|
||||
sleep 1
|
||||
@@ -20,16 +30,16 @@ then
|
||||
if kill -0 "$pid" 2>/dev/null
|
||||
then
|
||||
echo ""
|
||||
echo "$daemon is now running with PID=$pid"
|
||||
echo "$daemon is now running with PID=$pid (config=$CONFIG)"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
echo "Failed to start $daemon. Check gps.log"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "$daemon is already running with PID=$pid"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user