1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/invidious_ynh.git synced 2024-09-03 19:15:55 +02:00
This commit is contained in:
ericgaspar 2022-01-14 00:26:47 +01:00
parent abbdc63eaa
commit fff2b6be3c
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 22 additions and 3 deletions

View file

@ -252,7 +252,7 @@ hsts: true
## Accepted values: true, false ## Accepted values: true, false
## Default: true ## Default: true
## ##
registration_enabled: true registration_enabled: __REGISTRATION_ENABLED__
## ##
## Allow/Forbid users to log-in. This setting affects the ability ## Allow/Forbid users to log-in. This setting affects the ability
@ -261,7 +261,7 @@ registration_enabled: true
## Accepted values: true, false ## Accepted values: true, false
## Default: true ## Default: true
## ##
login_enabled: true login_enabled: __LOGIN_ENABLED__
## ##
## Enable/Disable the captcha challenge on the login page. ## Enable/Disable the captcha challenge on the login page.
@ -272,7 +272,7 @@ login_enabled: true
## Accepted values: true, false ## Accepted values: true, false
## Default: true ## Default: true
## ##
captcha_enabled: true captcha_enabled: __CAPTCHA_ENABLED__
## ##
## List of usernames that will be granted administrator rights. ## List of usernames that will be granted administrator rights.

View file

@ -25,6 +25,10 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
registration_enabled=$(ynh_app_setting_get --app=$app --key=registration_enabled)
login_enabled=$(ynh_app_setting_get --app=$app --key=login_enabled)
captcha_enabled=$(ynh_app_setting_get --app=$app --key=captcha_enabled)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
@ -59,6 +63,21 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [ -z "$registration_enabled" ]; then
registration_enabled="true"
ynh_app_setting_set --app=$app --key=registration_enabled --value=$registration_enabled
fi
if [ -z "$login_enabled" ]; then
login_enabled="true"
ynh_app_setting_set --app=$app --key=login_enabled --value=$login_enabled
fi
if [ -z "$captcha_enabled" ]; then
captcha_enabled="true"
ynh_app_setting_set --app=$app --key=captcha_enabled --value=$captcha_enabled
fi
# Cleaning legacy permissions # Cleaning legacy permissions
if ynh_legacy_permissions_exists; then if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all ynh_legacy_permissions_delete_all