mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-10-30 22:01:57 +01:00
Update entrypoint.sh
This commit is contained in:
1 parent
430279809e
commit
3fdebf3bf9
1 file changed
+6
-2
@@ -7,8 +7,12 @@ fi
|
||||
# if using docker, set interface type to tcp and hostname to meshtasticd:4403
|
||||
if [ -f /app/config.ini ]; then
|
||||
ls -l /app/config.ini
|
||||
sed -i '/^\[interface\]/,/^[^[]/ s/type = .*/type = tcp/' /app/config.ini
|
||||
sed -i '/^\[interface\]/,/^[^[]/ s/hostname = .*/hostname = meshtasticd:4403/' /app/config.ini
|
||||
# Set type = tcp in [interface]
|
||||
sed -i '/^\[interface\]/,/^[^[]/ s/^type = .*/type = tcp/' /app/config.ini
|
||||
# Remove any commented or uncommented hostname lines in [interface]
|
||||
sed -i '/^\[interface\]/,/^[^[]/ s/^#\? *hostname = .*$//' /app/config.ini
|
||||
# Add hostname = meshtasticd:4403 after [interface]
|
||||
sed -i '/^\[interface\]/a hostname = meshtasticd:4403' /app/config.ini
|
||||
fi
|
||||
# Run the bot as appuser (if you want to drop privileges)
|
||||
exec python /app/mesh_bot.py
|
||||
Reference in new issue
Block a user