mirror of
https://github.com/YunoHost-Apps/emailpoubelle_ynh.git
synced 2024-09-03 18:26:29 +02:00
Fix
This commit is contained in:
parent
3dc0c866fd
commit
342bced939
6 changed files with 14 additions and 26 deletions
|
@ -4,11 +4,6 @@ location __PATH__/ {
|
|||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index www/index.php;
|
||||
|
||||
try_files $uri $uri/ index.php;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"email": "misterl56@hotmail.com"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.2.8"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
extra_php_dependencies="php${YNH_PHP_VERSION}-geoip php${YNH_PHP_VERSION}-cli"
|
||||
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-geoip php${YNH_PHP_VERSION}-cli"
|
||||
|
||||
lang="fr_FR.UTF-8 en_US.UTF-8 it_IT.UTF-8"
|
||||
|
|
|
@ -26,6 +26,7 @@ path_url=$YNH_APP_ARG_PATH
|
|||
admin=$YNH_APP_ARG_ADMIN
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
phpversion=$YNH_PHP_VERSION
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -48,6 +49,14 @@ 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=phpversion --value=$phpversion
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
#INSTALL DEPENDENCIES
|
||||
|
@ -99,8 +108,7 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
ynh_add_fpm_config
|
||||
|
||||
#===============================================
|
||||
# ADD A CONFIGURATION
|
||||
|
|
|
@ -35,8 +35,7 @@ admin=$(ynh_app_setting_get --app=$app --key=admin)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=1
|
||||
|
||||
test ! -d $final_path \
|
||||
|| ynh_die "There is already a directory: $final_path "
|
||||
test ! -d $final_path || ynh_die "There is already a directory: $final_path "
|
||||
|
||||
# Check user
|
||||
ynh_user_exists "$admin"
|
||||
|
@ -64,8 +63,6 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=5
|
|||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -86,19 +86,6 @@ ynh_script_progression --message="Upgrading dependencies..."
|
|||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
#UPDATE SETTINGS
|
||||
#=================================================
|
||||
|
||||
#mysqlpwd setting was implemented in ynh2 - check if saved and if not implement
|
||||
db_pass=$(ynh_app_setting_get $app mysqlpwd)
|
||||
if [ -z $db_pass ]; then
|
||||
#c'est moche mais ça fera bien l'affaire - en deux lignes sinon pb en fonction du type de shell
|
||||
t=$(cat /var/www/$app/conf.php | grep DBPASS)
|
||||
db_pass=${t:26:24}
|
||||
ynh_app_setting_set $app mysqlpwd $db_pass
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
#INSTALL SOURCES
|
||||
#===============================================
|
||||
|
|
Loading…
Add table
Reference in a new issue