Fix openvpn problems, remove tinyproxy, move dockerfile to ubuntu 18.04 as alpine crashes

This commit is contained in:
Eldwan Brianne
2021-02-15 18:44:10 +01:00
parent 88d05f44e0
commit b71fa6764c
10 changed files with 85 additions and 125 deletions

View File

@@ -49,14 +49,15 @@ if [[ "${ENABLE_UFW,,}" == "true" ]] || [[ -n "${LOCAL_NETWORK-}" ]]; then
eval $(/sbin/ip r l | awk '{if($5!="tun0"){print "GW="$3"\nINT="$5; exit}}')
## IF we use UFW_ALLOW_GW_NET along with ENABLE_UFW we need to know what our netmask CIDR is
if [[ "${ENABLE_UFW,,}" == "true" ]] && [[ "${UFW_ALLOW_GW_NET,,}" == "true" ]]; then
eval $(ip r l dev ${INT} | awk '{if($5=="link"){print "GW_CIDR="$1; exit}}')
eval $(ip r l dev ${INT} | awk '{if($3=="link"){print "GW_CIDR="$1; exit}}')
fi
fi
if [[ "${UFW_ALLOW_GW_NET,,}" == "true" ]]; then
log "Allow in and out from ${GW_CIDR}"
ufw allow in from ${GW_CIDR}
ufw allow out from ${GW_CIDR}
echo "Got local network ${GW} and CIDR ${GW_CIDR} on interface ${INT}"
if [[ "${ENABLE_UFW,,}" == "true" && "${UFW_ALLOW_GW_NET,,}" == "true" ]]; then
log "Allow from ${GW_CIDR}"
ufw allow from ${GW_CIDR}
fi
if [[ -n "${LOCAL_NETWORK-}" ]]; then
@@ -68,6 +69,8 @@ if [[ -n "${LOCAL_NETWORK-}" ]]; then
fi
fi
ufw status
log "Starting Deluge"
exec su --preserve-environment abc -s /bin/bash -c "/usr/bin/deluged -d -c /config -L info -l /config/deluged.log" &
@@ -93,4 +96,4 @@ if [[ -x /config/deluge-post-start.sh ]]; then
log "/config/deluge-post-start.sh returned $?"
fi
log "Deluge startup script complete."
log "Deluge startup script complete."