2
This commit is contained in:
parent
5843076d3a
commit
e67eee4a81
8
ais-runner
Normal file
8
ais-runner
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
name="ais-runner"
|
||||||
|
description="ais runner"
|
||||||
|
command="/root/ais/ais_query.sh"
|
||||||
|
command_background=true
|
||||||
|
pidfile="/run/ais-runner.pid"
|
||||||
|
output_log="/var/log/${RC_SVCNAME}.log"
|
||||||
|
error_log="/var/log/${RC_SVCNAME}.err"
|
||||||
@ -11,7 +11,7 @@ WEBSOCKET_URL="wss://stream.aisstream.io/v0/stream"
|
|||||||
# Default bounding box (worldwide coverage)
|
# Default bounding box (worldwide coverage)
|
||||||
# Format: [[lat1, lon1], [lat2, lon2]]
|
# Format: [[lat1, lon1], [lat2, lon2]]
|
||||||
# Current setting covers the entire world
|
# Current setting covers the entire world
|
||||||
BOUNDING_BOX='[[[-90, -180], [90, 180]]]'
|
BOUNDING_BOX='[[[-90,0],[5,60]]]'
|
||||||
|
|
||||||
# Optional: Filter by specific ship MMSI numbers (up to 50)
|
# Optional: Filter by specific ship MMSI numbers (up to 50)
|
||||||
# Leave empty for all ships
|
# Leave empty for all ships
|
||||||
@ -22,8 +22,9 @@ SHIP_MMSI_FILTER='["227397210"]'
|
|||||||
MESSAGE_TYPE_FILTER='["PositionReport"]'
|
MESSAGE_TYPE_FILTER='["PositionReport"]'
|
||||||
|
|
||||||
# Output file for logging (optional)
|
# Output file for logging (optional)
|
||||||
DateFichier=`date +"%Y%m%d-%H%M%S"`
|
DateFichier=$(date +"%Y%m%d-%H%M%S")
|
||||||
OUTPUT_FILE="raw_ais_"$DateFichier".log"
|
dir=$(dirname $0)
|
||||||
|
OUTPUT_FILE="$dir/raw_ais_$DateFichier.log"
|
||||||
|
|
||||||
# Function to display usage information
|
# Function to display usage information
|
||||||
show_usage() {
|
show_usage() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user