From edc22765e8ab1d5cf6f7d4a57b0ef74425ef7c7e Mon Sep 17 00:00:00 2001 From: binhex Date: Mon, 8 Jul 2019 12:53:51 +0100 Subject: [PATCH] consolidate source scripts, retry for extip --- build/qbittorrent.conf | 7 ------- build/root/install.sh | 3 --- run/nobody/watchdog.sh | 13 ++----------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/build/qbittorrent.conf b/build/qbittorrent.conf index be9a8f6..d7558d5 100644 --- a/build/qbittorrent.conf +++ b/build/qbittorrent.conf @@ -11,10 +11,3 @@ startsecs = 0 user = nobody command = /home/nobody/watchdog.sh umask = 000 - -[program:privoxy-script] -autorestart = false -startsecs = 0 -user = nobody -command = /home/nobody/privoxy.sh -umask = 000 diff --git a/build/root/install.sh b/build/root/install.sh index 62d12d8..2fc5156 100644 --- a/build/root/install.sh +++ b/build/root/install.sh @@ -153,9 +153,6 @@ if [[ $VPN_ENABLED == "yes" ]]; then # force removal of mac os resource fork files in ovpn folder rm -rf /config/openvpn/._*.ovpn - # remove temporary file from previous run, used to confirm all iptables chain policies are set to drop - rm -f /tmp/checkiptables || true - # wildcard search for openvpn config files (match on first result) export VPN_CONFIG=$(find /config/openvpn -maxdepth 1 -name "*.ovpn" -print -quit) diff --git a/run/nobody/watchdog.sh b/run/nobody/watchdog.sh index 5185fae..4258ec2 100644 --- a/run/nobody/watchdog.sh +++ b/run/nobody/watchdog.sh @@ -44,11 +44,8 @@ while true; do # 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}" - # run script to check iptables chain policy is in place (will block until configured) - source /home/nobody/checkiptables.sh - - # run script to check ip is valid for tunnel device (will block until valid) - source /home/nobody/getvpnip.sh + # run script to get all required info + source /home/nobody/preruncheck.sh # if vpn_ip is not blank then run, otherwise log warning if [[ ! -z "${vpn_ip}" ]]; then @@ -91,14 +88,8 @@ while true; do fi - # run scripts to identify external ip address - source /home/nobody/getvpnextip.sh - if [[ "${VPN_PROV}" == "pia" ]]; then - # run scripts to identify vpn port - source /home/nobody/getvpnport.sh - # if vpn port is not an integer then dont change port if [[ ! "${VPN_INCOMING_PORT}" =~ ^-?[0-9]+$ ]]; then