Browse Source

removed < version 6.10 logic. Users must update LOGIN_PAGE var manually if on < v6.10

pull/448/head
GilbN 2 years ago
parent
commit
6daaabbbb8
  1. 13
      css/addons/unraid/login-page/custom_login.sh

13
css/addons/unraid/login-page/custom_login.sh

@ -16,6 +16,8 @@ DISABLE_THEME="false"
# If your custom domain uses a subfolder you must escape the forward slash. (custom.com\/subfolder)
# If you are on an Unraid version older than 6.10 you need to update the LOGIN_PAGE variable to "/usr/local/emhttp/login.php"
echo -e "Variables set:\\n\
TYPE = ${TYPE}\\n\
THEME = ${THEME}\\n\
@ -25,16 +27,15 @@ ADD_JS = ${ADD_JS}\\n\
JS = ${JS}\\n\
DISABLE_THEME = ${DISABLE_THEME}\\n"
echo "NOTE: Change the LOGIN_PAGE variable to /usr/local/emhttp/login.php if you are on a version older than 6.10"
LOGIN_PAGE="/usr/local/emhttp/webGui/include/.login.php"
IFS='"'
set $(cat /etc/unraid-version)
UNRAID_VERSION="$2"
IFS=$' \t\n'
LOGIN_PAGE="/usr/local/emhttp/login.php"
# Changing file path to login.php if version >= 6.10
if [[ "${UNRAID_VERSION}" =~ ^6.10.* ]]; then
echo "Unraid version: ${UNRAID_VERSION}, changing path to login page"
LOGIN_PAGE="/usr/local/emhttp/webGui/include/.login.php"
fi
echo "Unraid version: ${UNRAID_VERSION}"
# Restore login.php
if [ ${DISABLE_THEME} = "true" ]; then

Loading…
Cancel
Save