mirror of
https://github.com/YunoHost-Apps/gotosocial_ynh.git
synced 2024-09-03 19:16:06 +02:00
reorganize settings arguments
This commit is contained in:
parent
e05521ad61
commit
8e8891c23e
5 changed files with 25 additions and 8 deletions
|
@ -167,7 +167,7 @@ web-asset-base-dir: "./web/assets/"
|
||||||
# Bool. Do we want people to be able to just submit sign up requests, or do we want invite only?
|
# Bool. Do we want people to be able to just submit sign up requests, or do we want invite only?
|
||||||
# Options: [true, false]
|
# Options: [true, false]
|
||||||
# Default: true
|
# Default: true
|
||||||
accounts-registration-open: __REGISTRATION__
|
accounts-registration-open: __REGISTRATION_OPEN__
|
||||||
|
|
||||||
# Bool. Do sign up requests require approval from an admin/moderator before an account can sign in/use the server?
|
# Bool. Do sign up requests require approval from an admin/moderator before an account can sign in/use the server?
|
||||||
# Options: [true, false]
|
# Options: [true, false]
|
||||||
|
|
|
@ -29,8 +29,11 @@ ynh_print_info --message="Loading installation settings..."
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
|
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
|
||||||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -26,9 +26,11 @@ ynh_abort_if_errors
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url="/"
|
path_url="/"
|
||||||
|
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
email=$YNH_APP_ARG_EMAIL
|
email=$YNH_APP_ARG_EMAIL
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
|
|
||||||
registration=$YNH_APP_ARG_REGISTRATION
|
registration=$YNH_APP_ARG_REGISTRATION
|
||||||
registration_approval=$YNH_APP_ARG_REGISTRATION_APPROVAL
|
registration_approval=$YNH_APP_ARG_REGISTRATION_APPROVAL
|
||||||
registration_reason=$YNH_APP_ARG_REGISTRATION_REASON
|
registration_reason=$YNH_APP_ARG_REGISTRATION_REASON
|
||||||
|
@ -71,12 +73,16 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Storing installation settings..." --weight=1
|
ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||||
|
|
||||||
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
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=path_url --value=$path_url
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
ynh_app_setting_set --app=$app --key=email --value=$email
|
ynh_app_setting_set --app=$app --key=email --value=$email
|
||||||
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=registration --value=$registration
|
|
||||||
|
ynh_app_setting_set --app=$app --key=registration_open --value=$registration_open
|
||||||
ynh_app_setting_set --app=$app --key=registration_approval --value=$registration_approval
|
ynh_app_setting_set --app=$app --key=registration_approval --value=$registration_approval
|
||||||
ynh_app_setting_set --app=$app --key=registration_reason --value=$registration_reason
|
ynh_app_setting_set --app=$app --key=registration_reason --value=$registration_reason
|
||||||
|
|
||||||
|
@ -136,7 +142,6 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
|
|
||||||
architecture=$YNH_ARCH
|
architecture=$YNH_ARCH
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path" --source_id=$architecture
|
ynh_setup_source --dest_dir="$final_path" --source_id=$architecture
|
||||||
|
|
||||||
|
|
|
@ -28,12 +28,20 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
|
path_url=$(ynh_app_setting_get --app=$app --key=path_url)
|
||||||
|
|
||||||
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=db_pwd)
|
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
||||||
|
|
||||||
|
registration_open=$(ynh_app_setting_get --app=$app --key=registration_open)
|
||||||
|
registration_approval=$(ynh_app_setting_get --app=$app --key=registration_approval)
|
||||||
|
registration_reason=$(ynh_app_setting_get --app=$app --key=registration_reason)
|
||||||
|
|
||||||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,12 +20,13 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
|
path_url=$(ynh_app_setting_get --app=$app --key=path_url)
|
||||||
|
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$(ynh_app_setting_get --app=$app --key=db_user)
|
db_user=$(ynh_app_setting_get --app=$app --key=db_user)
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
||||||
|
|
||||||
registration=$(ynh_app_setting_get --app=$app --key=registration)
|
registration_open=$(ynh_app_setting_get --app=$app --key=registration_open)
|
||||||
registration_approval=$(ynh_app_setting_get --app=$app --key=registration_approval)
|
registration_approval=$(ynh_app_setting_get --app=$app --key=registration_approval)
|
||||||
registration_reason=$(ynh_app_setting_get --app=$app --key=registration_reason)
|
registration_reason=$(ynh_app_setting_get --app=$app --key=registration_reason)
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@ then
|
||||||
architecture=$YNH_ARCH
|
architecture=$YNH_ARCH
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path" --source_id=$architecture
|
ynh_setup_source --dest_dir="$final_path" --source_id=$architecture --keep="config.yaml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME: this should be managed by the core in the future
|
# FIXME: this should be managed by the core in the future
|
||||||
|
|
Loading…
Add table
Reference in a new issue