Skip to content

Commit

Permalink
systemd cfg
Browse files Browse the repository at this point in the history
Signed-off-by: Clemens Vasters <clemens@vasters.com>
  • Loading branch information
clemensv committed Jan 23, 2025
1 parent 12cb881 commit 65a7a70
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mode-s/rpi_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,20 @@ After=network.target
[Service]
User=mode_s_kafka_bridge
WorkingDirectory=$home_dir
ExecStart=$venv_dir/bin/mode_s_kafka_bridge feed --dump1090-host $DUMP1090_HOST --dump1090-port $DUMP1090_PORT --ref-lat $ANTENNA_LAT --ref-lon $ANTENNA_LON --stationid $STATIONID \\
${CONTENT_MODE:+--content-mode "$CONTENT_MODE"} \\
${CONNECTION_STRING:+--connection-string "$CONNECTION_STRING"} \\
${CONNECTION_STRING:- --kafka-bootstrap-servers "$KAFKA_BOOTSTRAP_SERVERS" --kafka-topic "$KAFKA_TOPIC" --sasl-username "$SASL_USERNAME" --sasl-password "$SASL_PASSWORD"}
ExecStart=$venv_dir/bin/mode_s_kafka_bridge feed
Environment="STATIONID=$STATIONID"
Environment="CONTENT_MODE=$CONTENT_MODE"
Environment="KAFKA_BOOTSTRAP_SERVERS=$KAFKA_BOOTSTRAP_SERVERS"
Environment="KAFKA_TOPIC=$KAFKA_TOPIC"
Environment="SASL_USERNAME=$SASL_USERNAME"
Environment="SASL_PASSWORD=$SASL_PASSWORD"
Environment="CONNECTION_STRING=$CONNECTION_STRING"
Environment="ANTENNA_LAT=$ANTENNA_LAT"
Environment="ANTENNA_LON=$ANTENNA_LON"
Environment="DUMP1090_HOST=$DUMP1090_HOST"
Environment="DUMP1090_PORT=$DUMP1090_PORT"
StandardOutput=append:/var/log/mode_s_kafka_bridge/stdout.log
StandardError=append:/var/log/mode_s_kafka_bridge/stderr.log
Restart=always
[Install]
Expand Down

0 comments on commit 65a7a70

Please sign in to comment.