1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/noalyss_ynh.git synced 2024-09-03 19:46:20 +02:00
This commit is contained in:
ericgaspar 2021-04-03 17:48:35 +02:00
parent 41ade59d76
commit 4cce640056
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 2 additions and 43 deletions

View file

@ -15,7 +15,7 @@
"url": "https://computhings.be" "url": "https://computhings.be"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.1.0" "yunohost": ">= 4.1.7"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [
@ -27,46 +27,26 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain name for Noalyss",
"fr": "Choisissez un nom de domaine pour Noalyss"
},
"example": "example.com" "example": "example.com"
}, },
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"ask": {
"en": "Choose a path for Noalyss",
"fr": "Choisissez un chemin pour Noalyss"
},
"example": "/noalyss", "example": "/noalyss",
"default": "/noalyss" "default": "/noalyss"
}, },
{ {
"name": "admin", "name": "admin",
"type": "user", "type": "user",
"ask": {
"en": "Choose the Mantis administrator",
"fr": "Choisissez ladministrateur de Mantis"
}
}, },
{ {
"name": "password", "name": "password",
"type": "password", "type": "password",
"ask": {
"en": "Set the administrator password",
"fr": "Définissez le mot de passe administrateur"
},
"example": "Choose a password" "example": "Choose a password"
}, },
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
},
"default": true "default": true
} }
] ]

View file

@ -131,19 +131,7 @@ phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
# ================================================= # =================================================
ynh_script_progression --message="Modifying $app config file..." ynh_script_progression --message="Modifying $app config file..."
cp ../conf/noalyss.conf $final_path/include/config.inc.php ynh_add_config --template="../conf/noalyss.conf" --destination="$final_path/include/config.inc.php"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/include/config.inc.php"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/include/config.inc.php"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/include/config.inc.php"
ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/include/config.inc.php"
#=================================================
# STORE THE CONFIG FILE CHECKSUM
#=================================================
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum "$final_path/include/config.inc.php"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -35,15 +35,6 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
# If db_name doesn't exist, create it # If db_name doesn't exist, create it
if [ -z "$db_name" ]; then if [ -z "$db_name" ]; then
db_name=$(ynh_sanitize_dbid --db_name=$app) db_name=$(ynh_sanitize_dbid --db_name=$app)