openwebrx/docker/scripts/run.sh

20 lines
309 B
Bash
Raw Normal View History

2019-01-13 22:04:29 +01:00
#!/bin/bash
set -euo pipefail
2019-12-14 19:05:22 +01:00
if [[ ! -f /etc/openwebrx/config_webrx.py ]] ; then
mkdir -p /etc/openwebrx/
cp config_webrx.py /etc/openwebrx/
2019-01-13 22:04:29 +01:00
fi
_term() {
echo "Caught signal!"
kill -TERM "$child" 2>/dev/null
}
trap _term SIGTERM SIGINT
2019-06-20 14:46:04 +02:00
python3 openwebrx.py $@ &
2019-01-13 22:04:29 +01:00
child=$!
wait "$child"