autorestart
This commit is contained in:
parent
e67eee4a81
commit
96326f6c44
8
ais-autorestart.sh
Executable file
8
ais-autorestart.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
SERVICE="ais-runner"
|
||||
|
||||
if ! rc-service $SERVICE status | grep -q "started"; then
|
||||
echo "$(date): $SERVICE is down. Restarting..." >> /var/log/service-monitor.log
|
||||
rc-service $SERVICE restart
|
||||
fi
|
||||
0
ais-runner
Normal file → Executable file
0
ais-runner
Normal file → Executable file
24
ais_query.sh
24
ais_query.sh
@ -124,20 +124,20 @@ if [ "$API_KEY" = "YOUR_API_KEY_HERE" ] || [ -z "$API_KEY" ]; then
|
||||
fi
|
||||
|
||||
# Validate JSON formats
|
||||
if ! validate_json "$BOUNDING_BOX"; then
|
||||
echo "Error: Invalid bounding box JSON format" >&2
|
||||
exit 1
|
||||
fi
|
||||
#if ! validate_json "$BOUNDING_BOX"; then
|
||||
# echo "Error: Invalid bounding box JSON format" >&2
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
if ! validate_json "$SHIP_MMSI_FILTER"; then
|
||||
echo "Error: Invalid MMSI filter JSON format" >&2
|
||||
exit 1
|
||||
fi
|
||||
#if ! validate_json "$SHIP_MMSI_FILTER"; then
|
||||
# echo "Error: Invalid MMSI filter JSON format" >&2
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
if ! validate_json "$MESSAGE_TYPE_FILTER"; then
|
||||
echo "Error: Invalid message type filter JSON format" >&2
|
||||
exit 1
|
||||
fi
|
||||
#if ! validate_json "$MESSAGE_TYPE_FILTER"; then
|
||||
# echo "Error: Invalid message type filter JSON format" >&2
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
# Create subscription message
|
||||
create_subscription_message() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user