Fixing startup of tinyproxy on alpine, also add a missing env var to export #1334

This commit is contained in:
Kristian Haugene
2020-10-28 22:37:19 +01:00
parent 91b036b398
commit 2d34ea860f
2 changed files with 8 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ wanted_variables = {
'DROP_DEFAULT_ROUTE',
'GLOBAL_APPLY_PERMISSIONS',
'LOG_TO_STDOUT',
'DISABLE_PORT_UPDATER',
}
variables_to_persist = {}

View File

@@ -66,7 +66,13 @@ if [[ "${WEBPROXY_ENABLED}" = "true" ]]; then
# Lower log level for privacy (writes dns names by default)
sed -i -e "s/LogLevel Info/LogLevel Critical/" ${PROXY_CONF}
/etc/init.d/tinyproxy start
if command -v tinyproxy &> /dev/null; then
echo "tinyproxy is on the PATH, run it"
tinyproxy -c ${PROXY_CONF}
else
/etc/init.d/tinyproxy start
fi
echo "Tinyproxy startup script complete."
fi