mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2026-04-28 11:17:36 +02:00
DOMAIN env var functionality improvements
This commit is contained in:
@@ -6,12 +6,12 @@ resultUserscriptPath="./stable.user.js"
|
||||
|
||||
domain="${DOMAIN}"
|
||||
|
||||
if [ -f "${domainPath}" ]; then
|
||||
if [ -z "${domain}" ] && [ -f "${domainPath}" ]; then
|
||||
domain=$(cat "${domainPath}")
|
||||
fi
|
||||
|
||||
if [ -z "${domain}" ]; then
|
||||
echo -e "\033[0;41m${domainPath} does not exist, and DOMAIN is not set!\033[0m"
|
||||
echo -e "\033[0;41mDOMAIN is not set, and ${domainPath} does not exist!\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user