1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/backdrop_ynh.git synced 2024-09-03 20:36:14 +02:00

Merge pull request #9 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-03-16 08:30:00 +01:00 committed by GitHub
commit 97a926869e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 26 deletions

View file

@ -31,7 +31,6 @@ Backdrop CMS includes an update utility to handle any necessary changes to the d
## Documentation ## Documentation
* Official documentation: https://backdropcms.org/user-guide * Official documentation: https://backdropcms.org/user-guide
* YunoHost documentation: https://yunohost.org/#/app_backdrop
## YunoHost specific features ## YunoHost specific features

View file

@ -20,7 +20,7 @@ Backdrop CMS is a simple, lightweight, and easy-to-use Content Management System
## Démo ## Démo
* [Démo officielle](https://demo.yunohost.org/ttrss/) * [Démo officielle](https://backdropcms.org/demo)
## Configuration ## Configuration
@ -29,7 +29,6 @@ Backdrop CMS inclus un utilitaire de mise à jour pour gérer toutes les modific
## Documentation ## Documentation
* Documentation officielle : https://backdropcms.org/user-guide * Documentation officielle : https://backdropcms.org/user-guide
* Documentation YunoHost : https://yunohost.org/#/app_backdrop_fr
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost

View file

@ -12,8 +12,8 @@
* advanced database documentation at * advanced database documentation at
* https://api.backdropcms.org/database-configuration * https://api.backdropcms.org/database-configuration
*/ */
$database = 'mysql://__DBNAME__:__DBPWD__@localhost/__DBNAME__'; $database = 'mysql://__DB_NAME__:__DB_PWD__@localhost/__DB_NAME__';
$database_prefix = '__DBNAME___'; $database_prefix = '__DB_NAME___';
/** /**
* Site configuration files location. * Site configuration files location.

View file

@ -6,7 +6,7 @@
"en": "Easy-to-use CMS for building professional websites", "en": "Easy-to-use CMS for building professional websites",
"fr": "CMS facile à utiliser pour créer des sites Web professionnels" "fr": "CMS facile à utiliser pour créer des sites Web professionnels"
}, },
"version": "1.18.1~ynh1", "version": "1.18.1~ynh2",
"url": "https://backdropcms.org/", "url": "https://backdropcms.org/",
"license": "GPL-2.0", "license": "GPL-2.0",
"maintainer": { "maintainer": {
@ -14,7 +14,7 @@
"email": "" "email": ""
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.0.0" "yunohost": ">= 4.1.7"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
@ -27,29 +27,17 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain for Backdrop",
"fr": "Choisissez un domaine pour Backdrop"
},
"example": "domain.org" "example": "domain.org"
}, },
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"ask": {
"en": "Choose a path for Backdrop",
"fr": "Choisissez un chemin pour Backdrop"
},
"example": "/backdrop", "example": "/backdrop",
"default": "/backdrop" "default": "/backdrop"
}, },
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": {
"en": "Is it a public site?",
"fr": "Est-ce un site public ?"
},
"help": { "help": {
"en": "If enabled, Backdrop will be accessible by people who do not have an account. This can be changed later via the webadmin.", "en": "If enabled, Backdrop will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, Backdrop sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." "fr": "Si cette case est cochée, Backdrop sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."

View file

@ -8,6 +8,7 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
ynh_abort_if_errors
#================================================= #=================================================
# RETRIEVE ARGUMENTS # RETRIEVE ARGUMENTS

View file

@ -43,7 +43,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=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
@ -55,7 +54,6 @@ ynh_script_progression --message="Creating a MySQL database..." --weight=2
db_name=$(ynh_sanitize_dbid $app) db_name=$(ynh_sanitize_dbid $app)
ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -101,10 +99,9 @@ ynh_script_progression --message="Configuring Backdrop..." --weight=1
cp ../conf/settings.example.php "$final_path/settings.php" cp ../conf/settings.example.php "$final_path/settings.php"
# Change variables in ttrss configuration # Change variables in ttrss configuration
ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$final_path/settings.php" ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/settings.php"
ynh_replace_string --match_string="__DBPWD__" --replace_string="$db_pwd" --target_file="$final_path/settings.php" ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/settings.php"
ynh_replace_string --match_string="__SALT__" --replace_string="$(ynh_string_random --length=30)" --target_file="$final_path/settings.php" ynh_replace_string --match_string="__SALT__" --replace_string="$(ynh_string_random --length=30)" --target_file="$final_path/settings.php"
#ynh_replace_string --match_string="__DOMAIN__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php"
# Recalculate and store the config file checksum into the app settings # Recalculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$final_path/settings.php" ynh_store_file_checksum --file="$final_path/settings.php"
@ -121,7 +118,7 @@ chmod -R 770 $final_path/files
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring SSOwat..." --weight=1 ynh_script_progression --message="Configuring permissions..." --weight=1
# Make app public if necessary or protect it # Make app public if necessary or protect it
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]

View file

@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) 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)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
@ -47,6 +46,13 @@ if [ -z "$db_name" ]; then
ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name
fi fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================