From d6c88fdc6b7ed9e339522e8f9b2c7bebfac0b467 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 2 Oct 2018 16:50:01 +0200 Subject: [redocks] HIRN AN! --- core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/modules/redsocks') diff --git a/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy b/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy index 0457728f..94135bc3 100755 --- a/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy +++ b/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy @@ -31,9 +31,9 @@ echo "Setting up transparent proxying via $SLX_PROXY_IP" # Do this in addition so proxy-aware programs can use it directly mkdir -p /etc/profile.d -if [ "${SLX_PROXY_TYPE#0:5}" = "http-" ]; then +if [ "${SLX_PROXY_TYPE:0:5}" = "http-" ]; then echo "export http_proxy=http://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/" > "/etc/profile.d/system-proxy.sh" -elif [ "${SLX_PROXY_TYPE#0:5}" = "socks" ]; then +elif [ "${SLX_PROXY_TYPE:0:5}" = "socks" ]; then echo "export ALL_PROXY=${SLX_PROXY_TYPE}://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/" > "/etc/profile.d/system-proxy.sh" fi @@ -67,7 +67,7 @@ if [ -n "$SLX_PROXY_BLACKLIST" ]; then done >> "$tfile" fi -if [ "${SLX_PROXY_TYPE#0:5}" = "http-" ]; then +if [ "${SLX_PROXY_TYPE:0:5}" = "http-" ]; then # transparent proxying for HTTP echo "iptables -t nat -A REDSOCKS -p tcp --dport 80 -j DNAT --to-destination ${SLX_PROXY_IP}:${SLX_PROXY_PORT}" >> "$tfile" fi -- cgit v1.2.3-55-g7522