docker-transmission-openvpn/openvpn/tunnelDown.sh
edgd1er af3d905b3a
DEBUG: print all lines before execution (#2096)
* DEBUG: print all lines before execution

if var DEBUG is set to anything other than false, each bash script will be run with a set -x. This would ease debugging

* DEBUG: centralize commands in utils.sh
2021-12-05 08:25:22 +09:00

16 lines
486 B
Bash
Executable File

#!/bin/bash
#tunnel is down, restore resolv.conf to previous version
# Source our persisted env variables from container startup
. /etc/transmission/environment-variables.sh
source /etc/openvpn/utils.sh
if ls /etc/resolv.conf-*.sv 1> /dev/null 2>&1; then
cp /etc/resolv.conf-*.sv /etc/resolv.conf
echo "resolv.conf was restored"
else
echo "resolv.conf backup not found, could not restore"
fi
/etc/transmission/stop.sh
[[ -f /opt/privoxy/stop.sh ]] && /opt/privoxy/stop.sh