Merge branch 'master' into merge/master-into-dev

This commit is contained in:
Kristian Haugene
2020-10-10 14:04:31 +02:00
7 changed files with 36 additions and 3 deletions

View File

@@ -88,3 +88,4 @@
#WEBPROXY_USERNAME= #WEBPROXY_USERNAME=
#WEBPROXY_PASSWORD= #WEBPROXY_PASSWORD=
#DOCKER_LOG=false #DOCKER_LOG=false
#LOG_TO_STDOUT=false

View File

@@ -53,6 +53,7 @@ ENV OPENVPN_USERNAME=**None** \
WEBPROXY_USERNAME= \ WEBPROXY_USERNAME= \
WEBPROXY_PASSWORD= \ WEBPROXY_PASSWORD= \
DOCKER_LOG=false \ DOCKER_LOG=false \
LOG_TO_STDOUT=false \
HEALTH_CHECK_HOST=google.com HEALTH_CHECK_HOST=google.com
HEALTHCHECK --interval=1m CMD /etc/scripts/healthcheck.sh HEALTHCHECK --interval=1m CMD /etc/scripts/healthcheck.sh

View File

@@ -105,3 +105,11 @@ This might lead to the default route (your untunneled connection) to be used.
To drop the default route set the environment variable `DROP_DEFAULT_ROUTE` to `true`. To drop the default route set the environment variable `DROP_DEFAULT_ROUTE` to `true`.
*Note*: This is not compatible with all VPNs. You can check your iptables routing with the `ip r` command in a running container. *Note*: This is not compatible with all VPNs. You can check your iptables routing with the `ip r` command in a running container.
### Changing logging locations
By default Transmission will log to a file in `TRANSMISSION_HOME/transmission.log`.
To log to stdout instead set the environment variable `LOG_TO_STDOUT` to `true`.
*Note*: By default stdout is what container engines read logs from. Set this to true to have Tranmission logs in commands like `docker logs` and `kubectl logs`. OpenVPN currently only logs to stdout.

View File

@@ -1 +1 @@
http://www.frostvpn.com/clients/server-list.htm https://www.frostvpn.com/clients/servers.htm

View File

@@ -16,6 +16,29 @@ STATUS=$?
if [[ ${STATUS} -ne 0 ]] if [[ ${STATUS} -ne 0 ]]
then then
echo "Network is down" echo "Network is down"
INTERFACE=$(ls /sys/class/net | grep tun)
ISINTERFACE=$?
if [[ ${ISINTERFACE} -ne 0 ]]
then
echo "TUN Interface not found"
exit 1
fi
echo "Resetting TUN"
ip link set ${INTERFACE} down
sleep 1
ip link set ${INTERFACE} up
echo "Sent kill SIGUSR1 to openvpn"
pkill -SIGUSR1 openvpn
sleep 20
fi
ping -c 1 $HOST
STATUS=$?
if [[ ${STATUS} -ne 0 ]]
then
echo "Network is still down"
exit 1 exit 1
fi fi

View File

@@ -63,7 +63,7 @@ if [[ "true" = "$DROP_DEFAULT_ROUTE" ]]; then
ip r del default || exit 1 ip r del default || exit 1
fi fi
if [[ "true" = "$DOCKER_LOG" ]]; then if [[ "true" = "$DOCKER_LOG" || "true" = "$LOG_TO_STDOUT" ]]; then
LOGFILE=/dev/stdout LOGFILE=/dev/stdout
else else
LOGFILE=${TRANSMISSION_HOME}/transmission.log LOGFILE=${TRANSMISSION_HOME}/transmission.log

View File

@@ -13,7 +13,7 @@ if [ -n "$PUID" ] && [ ! "$(id -u root)" -eq "$PUID" ]; then
groupmod -o -g "$PGID" ${RUN_AS}; groupmod -o -g "$PGID" ${RUN_AS};
fi fi
if [[ "true" = "$DOCKER_LOG" ]]; then if [[ "true" = "$DOCKER_LOG" || "true" = "$LOG_TO_STDOUT" ]]; then
chown ${RUN_AS}:${RUN_AS} /dev/stdout chown ${RUN_AS}:${RUN_AS} /dev/stdout
fi fi