1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/selfoss_ynh.git synced 2024-09-03 20:16:21 +02:00
This commit is contained in:
ericgaspar 2022-03-22 15:49:04 +01:00
parent 8ca9eb3ef8
commit e11d888cdf
No known key found for this signature in database
GPG key ID: 574F281483054D44
7 changed files with 1 additions and 52 deletions

View file

@ -3,7 +3,6 @@
domain="domain.tld"
path="/path"
admin="john"
language="fr"
is_public=1
password="1Strong-Password"
; Checks

View file

@ -26,8 +26,7 @@
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm",
"mysql"
"php7.3-fpm"
],
"arguments": {
"install" : [
@ -35,28 +34,10 @@
"name": "domain",
"type": "domain"
},
{
"name": "admin",
"type": "user"
},
{
"name": "is_public",
"type": "boolean",
"default": true
},
{
"name": "language",
"type": "string",
"ask": {
"en": "Choose the application language",
"fr": "Choisissez la langue de l'application"
},
"choices": ["cn", "cs", "de", "en", "fr", "lv", "nl", "ru", "tr", "tw"],
"default": "fr"
},
{
"name": "password",
"type": "password"
}
]
}

View file

@ -31,7 +31,6 @@ app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
@ -44,12 +43,6 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE DATA DIR
#=================================================
ynh_backup --src_path="$datadir" --is_big
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================

View file

@ -22,11 +22,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url="/"
admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE
password=$YNH_APP_ARG_PASSWORD
salt=$(ynh_string_random --length=24)
app=$YNH_APP_INSTANCE_NAME
@ -48,9 +44,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
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=admin --value=$admin
ynh_app_setting_set --app=$app --key=language --value=$language
ynh_app_setting_set --app=$app --key=salt --value=$salt
#=================================================
# INSTALL DEPENDENCIES

View file

@ -17,7 +17,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================

View file

@ -64,19 +64,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$datadir" --not_mandatory
mkdir -p $datadir
chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================

View file

@ -18,10 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
admin=$(ynh_app_setting_get --app=$app --key=admin)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
language=$(ynh_app_setting_get --app=$app --key=language)
salt=$(ynh_app_setting_get --app=$app --key=salt)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)