diff --git a/bootstrap.sh b/bootstrap.sh index 77f6fde..9ece0b6 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -18,9 +18,10 @@ if [[ ! -f "$BASE_DIR/config.ini" ]]; then cp "$BASE_DIR/config.template" "$BASE_DIR/config.ini" sleep 1 replace="s|type = serial|type = tcp|g" - sed -i '' "$replace" "$BASE_DIR/config.ini" + sed -i.bak "$replace" "$BASE_DIR/config.ini" replace="s|# hostname = meshtastic.local|hostname = localhost|g" - sed -i '' "$replace" "$BASE_DIR/config.ini" + sed -i.bak "$replace" "$BASE_DIR/config.ini" + rm -f "$BASE_DIR/config.ini.bak" else echo "config.ini already exists, leaving it unchanged." fi