Compare commits
2 Commits
feature/tr
...
4b519610af
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b519610af | ||
| b58a0346d1 |
@@ -62,6 +62,7 @@ create_backup() {
|
|||||||
cp "$1" "$2"
|
cp "$1" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# PART 1: Update .env file from .env.example
|
# PART 1: Update .env file from .env.example
|
||||||
##################################################
|
##################################################
|
||||||
@@ -205,6 +206,7 @@ update_env_file() {
|
|||||||
echo -e "\n${BLUE}Review your updated $ENV_FILE file and adjust any values as needed.${NC}"
|
echo -e "\n${BLUE}Review your updated $ENV_FILE file and adjust any values as needed.${NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# PART 2: Update Authelia configuration
|
# PART 2: Update Authelia configuration
|
||||||
##################################################
|
##################################################
|
||||||
@@ -271,20 +273,30 @@ update_authelia_config() {
|
|||||||
|
|
||||||
# Update secrets in temp file if they existed in the backup
|
# Update secrets in temp file if they existed in the backup
|
||||||
if [[ -n "$existing_jwt_secret" && "$existing_jwt_secret" != '""' && "$existing_jwt_secret" != "null" ]]; then
|
if [[ -n "$existing_jwt_secret" && "$existing_jwt_secret" != '""' && "$existing_jwt_secret" != "null" ]]; then
|
||||||
yq e -i '.identity_validation.reset_password.jwt_secret = strenv(existing_jwt_secret)' --env existing_jwt_secret="$existing_jwt_secret" "$TEMP_CONFIG"
|
existing_jwt_secret="$existing_jwt_secret" \
|
||||||
|
yq e -i '.identity_validation.reset_password.jwt_secret = strenv(existing_jwt_secret)' "$TEMP_CONFIG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$existing_session_secret" && "$existing_session_secret" != '""' && "$existing_session_secret" != "null" ]]; then
|
if [[ -n "$existing_session_secret" && "$existing_session_secret" != '""' && "$existing_session_secret" != "null" ]]; then
|
||||||
yq e -i '.session.secret = strenv(existing_session_secret)' --env existing_session_secret="$existing_session_secret" "$TEMP_CONFIG"
|
existing_session_secret="$existing_session_secret" \
|
||||||
|
yq e -i '.session.secret = strenv(existing_session_secret)' "$TEMP_CONFIG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$existing_storage_key" && "$existing_storage_key" != '""' && "$existing_storage_key" != "null" ]]; then
|
if [[ -n "$existing_storage_key" && "$existing_storage_key" != '""' && "$existing_storage_key" != "null" ]]; then
|
||||||
yq e -i '.storage.encryption_key = strenv(existing_storage_key)' --env existing_storage_key="$existing_storage_key" "$TEMP_CONFIG"
|
existing_storage_key="$existing_storage_key" \
|
||||||
|
yq e -i '.storage.encryption_key = strenv(existing_storage_key)' "$TEMP_CONFIG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$existing_redis_pass" && "$existing_redis_pass" != '""' && "$existing_redis_pass" != "null" ]]; then
|
if [[ -n "$existing_redis_pass" && "$existing_redis_pass" != '""' && "$existing_redis_pass" != "null" ]]; then
|
||||||
yq e -i '.session.redis.password = strenv(existing_redis_pass)' --env existing_redis_pass="$existing_redis_pass" "$TEMP_CONFIG"
|
existing_redis_pass="$existing_redis_pass" \
|
||||||
|
yq e -i '.session.redis.password = strenv(existing_redis_pass)' "$TEMP_CONFIG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$existing_notifier" && "$existing_notifier" != '""' && "$existing_notifier" != "null" ]]; then
|
if [[ -n "$existing_notifier" && "$existing_notifier" != '""' && "$existing_notifier" != "null" ]]; then
|
||||||
yq e -i '.notifier = strenv(existing_notifier)' --env existing_notifier="$existing_notifier" "$TEMP_CONFIG"
|
existing_notifier="$existing_notifier" \
|
||||||
|
yq e -i '.notifier = strenv(existing_notifier)' "$TEMP_CONFIG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update domain settings from .env
|
# Update domain settings from .env
|
||||||
@@ -332,6 +344,7 @@ update_authelia_config() {
|
|||||||
echo -e "${CYAN} docker compose restart authelia${NC}"
|
echo -e "${CYAN} docker compose restart authelia${NC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# PART 3: Update service configurations
|
# PART 3: Update service configurations
|
||||||
##################################################
|
##################################################
|
||||||
@@ -690,8 +703,7 @@ update_service_configs() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
##################################################
|
|
||||||
# PART 5: Authelia Account Management
|
|
||||||
##################################################
|
##################################################
|
||||||
# PART 4: Authelia Policy Management
|
# PART 4: Authelia Policy Management
|
||||||
##################################################
|
##################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user