mirror of
https://github.com/YunoHost-Apps/focalboard_ynh.git
synced 2024-09-03 18:36:19 +02:00
Add config panel
This commit is contained in:
parent
22e5578f0c
commit
e6ecff7ee8
4 changed files with 35 additions and 0 deletions
|
@ -11,5 +11,6 @@
|
|||
"telemetry": false,
|
||||
"session_expire_time": 2592000,
|
||||
"session_refresh_time": 18000,
|
||||
"enablePublicSharedBoards": __ENABLE_PUBLIC_SHARED_BOARDES__,
|
||||
"localOnly": false
|
||||
}
|
||||
|
|
16
config_panel.toml
Normal file
16
config_panel.toml
Normal file
|
@ -0,0 +1,16 @@
|
|||
version = "1.0"
|
||||
|
||||
[main]
|
||||
name = "Focalboard configuration"
|
||||
services = ["__APP__"]
|
||||
|
||||
[main.config]
|
||||
name = "Configuration Options"
|
||||
|
||||
[main.config.enablePublicSharedBoards]
|
||||
ask = "Enable public boards"
|
||||
type = "boolean"
|
||||
yes = "true"
|
||||
no = "false"
|
||||
help = "Enable publishing boards for public access"
|
||||
bind = "enablePublicSharedBoards:__FINALPATH__/config.json"
|
|
@ -30,6 +30,8 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
|
|||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
enable_public_shared_boards="false"
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
|
@ -50,6 +52,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=5
|
|||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=enable_public_shared_boards --value=$enable_public_shared_boards
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
|
|
|
@ -23,6 +23,8 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
files_path=$(ynh_app_setting_get --app=$app --key=files_path)
|
||||
|
||||
enable_public_shared_boards=$(ynh_app_setting_get --app=$app --key=enable_public_shared_boards)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
@ -34,6 +36,11 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
if [ -z "$enable_public_shared_boards" ]; then
|
||||
enable_public_shared_boards="true"
|
||||
ynh_app_setting_set --app=$app --key=enable_public_shared_boards --value=$enable_public_shared_boards
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
@ -115,6 +122,14 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..."
|
||||
|
||||
ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json"
|
||||
chmod 600 $final_path/config.json
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue