From b68b0069a2738f65dde3f8dc806be3e00047268f Mon Sep 17 00:00:00 2001 From: binhex Date: Sun, 11 Nov 2018 09:10:04 +0000 Subject: [PATCH] escape backslashes in sed --- run/nobody/watchdog.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run/nobody/watchdog.sh b/run/nobody/watchdog.sh index 9b1de4b..c762dd4 100644 --- a/run/nobody/watchdog.sh +++ b/run/nobody/watchdog.sh @@ -38,10 +38,10 @@ while true; do if [[ "${VPN_ENABLED}" == "yes" ]]; then # forcibly set allow anonymous access from localhost to api (used to change incoming port) - sed -i "s~^WebUI\LocalHostAuth=.*~WebUI\LocalHostAuth=false~g" "${qbittorrent_config}" + sed -i 's~^WebUI\\LocalHostAuth=.*~WebUI\\LocalHostAuth=false~g' "${qbittorrent_config}" # forcibly set random incoming port to false - sed -i "s~^General\UseRandomPort=.*~General\UseRandomPort=false~g" "${qbittorrent_config}" + sed -i 's~^General\\UseRandomPort=.*~General\\UseRandomPort=false~g' "${qbittorrent_config}" # run script to check ip is valid for tunnel device (will block until valid) source /home/nobody/getvpnip.sh