Update entrypoint.sh

This commit is contained in:
SpudGunMan
2025-10-23 23:00:36 -07:00
parent 48788ceda8
commit 6bc3c3e980

View File

@@ -2,12 +2,11 @@
# if no config.ini exists, copy the default one
if [ ! -f /app/config.ini ]; then
cp config.template config.ini
cp /app/config.template /app/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
if [ -f /app/config.ini ]; then
sed -i '/^\[interface\]/,/^[^[]/ s/type = .*/type = tcp/' -e '/^\[interface\]/,/^[^[]/ s/hostname = .*/hostname = meshtasticd:4403/' /app/config.ini
fi
# Run the bot as appuser (if you want to drop privileges)
exec python /app/mesh_bot.py