setup-ttrss.sh: Automatically enable secure image proxy (af_zz_imgproxy) plugin if SSL/TLS is enabled.

This commit is contained in:
x86dev 2017-07-28 22:12:19 +02:00
parent 26882927db
commit 95c7208ba5

View File

@ -106,8 +106,21 @@ setup_ttrss()
# Patch URL path. # Patch URL path.
sed -i -e 's@htt.*/@'"${TTRSS_SELF_URL}"'@g' ${TTRSS_PATH}/config.php sed -i -e 's@htt.*/@'"${TTRSS_SELF_URL}"'@g' ${TTRSS_PATH}/config.php
# Enable additional system plugins: api_newsplus. # Enable additional system plugins.
sed -i -e "s/.*define('PLUGINS'.*/define('PLUGINS', 'api_newsplus, auth_internal, note, updater');/g" ${TTRSS_PATH}/config.php if [ -z ${TTRSS_PLUGINS} ]; then
# api_newsplus (API for News+ Android App).
TTRSS_PLUGINS=api_newsplus
# Only if SSL/TLS is enabled: af_zz_imgproxy (Loads insecure images via built-in proxy).
if [ "$TTRSS_PROTO" = "https" ]; then
TTRSS_PLUGINS=${TTRSS_PLUGINS},af_zz_imgproxy
fi
fi
echo "Setup: Additional plugins: $TTRSS_PLUGINS"
sed -i -e "s/.*define('PLUGINS'.*/define('PLUGINS', '$TTRSS_PLUGINS, auth_internal, note, updater');/g" ${TTRSS_PATH}/config.php
} }
setup_db() setup_db()