mirror of
https://github.com/YunoHost-Apps/miniflux_ynh.git
synced 2024-09-03 19:45:58 +02:00
Fix
This commit is contained in:
parent
6295f6e949
commit
ffbef9123e
4 changed files with 35 additions and 1 deletions
|
@ -2,6 +2,6 @@ BASE_URL=https://__DOMAIN____PATH__
|
|||
LISTEN_ADDR=127.0.0.1:__PORT__
|
||||
DATABASE_URL=postgres://__DB_NAME__:__DB_PWD__@localhost/__DB_NAME__?sslmode=disable
|
||||
RUN_MIGRATIONS=1
|
||||
CREATE_ADMIN=1
|
||||
CREATE_ADMIN=__SET_ADMIN__
|
||||
ADMIN_USERNAME=__ADMIN__
|
||||
ADMIN_PASSWORD=__PASSWORD__
|
25
config_panel.toml
Normal file
25
config_panel.toml
Normal file
|
@ -0,0 +1,25 @@
|
|||
version = "1.0"
|
||||
|
||||
[main]
|
||||
name = "Miniflux configuration"
|
||||
|
||||
[main.config]
|
||||
name = "Configuration Options"
|
||||
|
||||
[main.config.set_admin]
|
||||
ask = "Allow admin"
|
||||
type = "boolean"
|
||||
help = "Enable authentication with user/password."
|
||||
bind = "CREATE_ADMIN:__FINALPATH__/__APP__.conf"
|
||||
|
||||
[main.config.admin]
|
||||
ask = "Set admin"
|
||||
type = "user"
|
||||
help = "enter the name of the admin."
|
||||
bind = "ADMIN_USERNAME:__FINALPATH__/__APP__.conf"
|
||||
|
||||
[main.config.password]
|
||||
ask = "Set password"
|
||||
type = "password"
|
||||
help = "Specify password."
|
||||
bind = "password:__FINALPATH__/__APP__.conf"
|
|
@ -29,6 +29,8 @@ admin=$YNH_APP_ARG_ADMIN
|
|||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
set_admin="1"
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
|
@ -50,6 +52,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url
|
|||
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=architecture --value=$architecture
|
||||
ynh_app_setting_set --app=$app --key=set_admin --value=$set_admin
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
|
|
|
@ -24,6 +24,7 @@ architecture=$YNH_ARCH
|
|||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
set_admin=$(ynh_app_setting_get --app=$app --key=set_admin)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -51,6 +52,11 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
if [ -z "$set_admin" ]; then
|
||||
set_admin="1"
|
||||
ynh_app_setting_set --app=$app --key=set_admin --value=$set_admin
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
|
Loading…
Add table
Reference in a new issue