mirror of
https://github.com/YunoHost-Apps/piwigo_ynh.git
synced 2024-09-03 20:06:03 +02:00
The manifest asks for the app language to be used with like 5 or 6 options, then proceed to savagely replace anything that is not fr or en with en...
This commit is contained in:
parent
e49082668d
commit
cdc6f8e6c0
3 changed files with 13 additions and 29 deletions
|
@ -45,8 +45,8 @@ ram.runtime = "50M"
|
|||
ask.en = "Choose the application language"
|
||||
ask.fr = "Choisissez la langue de l'application"
|
||||
type = "select"
|
||||
choices = ["de", "en", "es", "fr", "it", "pt"]
|
||||
default = "en"
|
||||
choices = ["fr_FR", "en_UK"]
|
||||
default = "en_UK"
|
||||
|
||||
[install.admin]
|
||||
type = "user"
|
||||
|
|
|
@ -68,18 +68,9 @@ chown -R $app:www-data "$data_dir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setuping application with CURL..." --weight=5
|
||||
|
||||
# Generate random password for admin
|
||||
if [ "$language" = "fr" ]; then
|
||||
applanguage="fr_FR"
|
||||
else
|
||||
applanguage="en_UK"
|
||||
fi
|
||||
|
||||
# Configure Piwigo via cURL
|
||||
mail="$(ynh_user_get_info --username=$admin --key=mail)"
|
||||
|
||||
# Installation with cURL
|
||||
ynh_local_curl "/install.php?language=$applanguage" "install=true" "dbhost=127.0.0.1" "dbuser=$db_user" "dbpasswd=$db_pwd" "dbname=$db_name" "prefix=" "admin_name=$admin" "admin_pass1=$password" "admin_pass2=$password" "admin_mail=$mail"
|
||||
mail="$(ynh_user_get_info --username=$admin --key=mail)"
|
||||
ynh_local_curl "/install.php?language=$language" "install=true" "dbhost=127.0.0.1" "dbuser=$db_user" "dbpasswd=$db_pwd" "dbname=$db_name" "prefix=" "admin_name=$admin" "admin_pass1=$password" "admin_pass2=$password" "admin_mail=$mail"
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE PIWIGO
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
# Boring backward compatibility
|
||||
if [ "${language:-}" == "fr" ] ; then
|
||||
language="fr_FR"
|
||||
else
|
||||
language="en_UK"
|
||||
fi
|
||||
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
@ -81,18 +83,9 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading Piwigo with cURL..." --weight=6
|
||||
|
||||
# Reload NGINX
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
if [ "$language" = "fr" ] ; then
|
||||
applanguage="fr_FR"
|
||||
else
|
||||
applanguage="en_UK"
|
||||
fi
|
||||
|
||||
# Upgrade Piwigo via cURL
|
||||
# FIXME : Why Curl ... Why can't we trigger the migration from the command line somehow ...
|
||||
#ynh_local_curl "/upgrade.php?language=$applanguage&now=true" "language=$applanguage" "username=$admin" "password=$admin_pwd"
|
||||
#ynh_local_curl "/upgrade.php?language=$language&now=true" "language=$language" "username=$admin" "password=$admin_pwd"
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE PIWIGO
|
||||
|
|
Loading…
Reference in a new issue