mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-03-28 17:32:36 +01:00
14 lines
491 B
Bash
14 lines
491 B
Bash
#!/bin/bash
|
|
|
|
# if no config.ini exists, copy the default one
|
|
if [ ! -f /app/config.ini ]; then
|
|
cp config.template config.ini
|
|
fi
|
|
# if using docker, set interface type to tcp and hostname to meshtasticd:4403
|
|
if [ "$DOCKER_ENV" = "true" ]; then
|
|
sed -i '' -e '/^\[interface\]/,/^[^[]/ s/type = .*/type = tcp/' -e '/^\[interface\]/,/^[^[]/ s/hostname = .*/hostname = meshtasticd:4403/' config.ini
|
|
fi
|
|
|
|
# Run the bot as appuser (if you want to drop privileges)
|
|
exec python /app/mesh_bot.py
|