1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/miniflux_ynh.git synced 2024-09-03 19:45:58 +02:00

Add invidious

This commit is contained in:
ericgaspar 2022-01-22 08:39:29 +01:00
parent 549f352ba5
commit 8a3131bfa8
3 changed files with 16 additions and 1 deletions

View file

@ -15,7 +15,7 @@ name = "Miniflux configuration"
[main.config.admin] [main.config.admin]
ask = "Set admin" ask = "Set admin"
type = "user" type = "user"
help = "enter the name of the admin." help = "Enter the name of the admin."
bind = "ADMIN_USERNAME:__FINALPATH__/__APP__.conf" bind = "ADMIN_USERNAME:__FINALPATH__/__APP__.conf"
[main.config.password] [main.config.password]
@ -23,3 +23,9 @@ name = "Miniflux configuration"
type = "password" type = "password"
help = "Specify password." help = "Specify password."
bind = "password:__FINALPATH__/__APP__.conf" bind = "password:__FINALPATH__/__APP__.conf"
[main.config.invidious_instance]
ask = "Set Invidious instance"
type = "domain"
help = "Set a custom Invidious instance to use."
bind = "INVIDIOUS_INSTANCE:__FINALPATH__/__APP__.conf"

View file

@ -30,6 +30,7 @@ admin=$YNH_APP_ARG_ADMIN
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
set_admin="1" set_admin="1"
invidious_instance=""
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
@ -53,6 +54,7 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=password --value=$password ynh_app_setting_set --app=$app --key=password --value=$password
ynh_app_setting_set --app=$app --key=architecture --value=$architecture ynh_app_setting_set --app=$app --key=architecture --value=$architecture
ynh_app_setting_set --app=$app --key=set_admin --value=$set_admin ynh_app_setting_set --app=$app --key=set_admin --value=$set_admin
ynh_app_setting_set --app=$app --key=invidious_instance --value=$invidious_instance
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS

View file

@ -25,7 +25,9 @@ architecture=$YNH_ARCH
db_name=$(ynh_app_setting_get --app=$app --key=db_name) 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)
set_admin=$(ynh_app_setting_get --app=$app --key=set_admin) set_admin=$(ynh_app_setting_get --app=$app --key=set_admin)
invidious_instance=$(ynh_app_setting_get --app=$app --key=invidious_instance)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
@ -58,6 +60,11 @@ if [ -z "$set_admin" ]; then
ynh_app_setting_set --app=$app --key=set_admin --value=$set_admin ynh_app_setting_set --app=$app --key=set_admin --value=$set_admin
fi fi
if [ -z "$invidious_instance" ]; then
invidious_instance=""
ynh_app_setting_set --app=$app --key=invidious_instance --value=$invidious_instance
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