1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00
This commit is contained in:
magikcypress 2017-03-29 19:00:53 +02:00
parent 1826fee4b2
commit c5af71b8e0
3 changed files with 13 additions and 13 deletions

View file

@ -3,12 +3,12 @@
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -eu set -eu
# Get multi-instances specific variables
app=$YNH_APP_INSTANCE_NAME
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
# Get multi-instances specific variables
app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain) domain=$(ynh_app_setting_get "$app" domain)

View file

@ -3,12 +3,12 @@
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -u set -u
# Source app helpers
source /usr/share/yunohost/helpers
# Get multi-instances specific variables # Get multi-instances specific variables
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
# Source app helpers
. /usr/share/yunohost/helpers
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain) domain=$(ynh_app_setting_get "$app" domain)
# with_mysql=$(ynh_app_setting_get "$app" with_mysql) # with_mysql=$(ynh_app_setting_get "$app" with_mysql)

View file

@ -4,12 +4,12 @@
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -eu set -eu
# The parameter $app is the id of the app instance ex: ynhexample__2
app=$YNH_APP_INSTANCE_NAME
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
# The parameter $app is the id of the app instance ex: ynhexample__2
app=$YNH_APP_INSTANCE_NAME
# Get old parameter of the app # Get old parameter of the app
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
path=$(ynh_app_setting_get $app path) path=$(ynh_app_setting_get $app path)
@ -27,17 +27,17 @@ if [ -d $final_path ]; then
fi fi
# Check configuration files nginx # Check configuration files nginx
nginx_conf="/etc/nginx/conf.d/${domain}.d/nginx.conf" nginx_conf="/etc/nginx/conf.d/${domain}.d/${app}.conf"
if [ -f $nginx_conf ]; then if [ -f $nginx_conf ]; then
ynh_die "The NGINX configuration already exists at '${nginx_conf}'. You should safely delete it before restoring this app." ynh_die "The NGINX configuration already exists at '${nginx_conf}'. You should safely delete it before restoring this app."
fi fi
# Check configuration files php-fpm # Check configuration files php-fpm
phpfpm_conf="/etc/php5/fpm/pool.d/php-fpm.conf" phpfpm_conf="/etc/php5/fpm/pool.d/php-fpm-${app}.conf"
if [ -f $phpfpm_conf ]; then if [ -f $phpfpm_conf ]; then
ynh_die "The PHP FPM configuration already exists at '${phpfpm_conf}'. You should safely delete it before restoring this app." ynh_die "The PHP FPM configuration already exists at '${phpfpm_conf}'. You should safely delete it before restoring this app."
fi fi
phpfpm_ini="/etc/php5/fpm/conf.d/php-fpm.ini" phpfpm_ini="/etc/php5/fpm/conf.d/20-${app}.ini"
if [ -f $phpfpm_ini ]; then if [ -f $phpfpm_ini ]; then
ynh_die "The PHP FPM INI configuration already exists at '${phpfpm_ini}'. You should safely delete it before restoring this app." ynh_die "The PHP FPM INI configuration already exists at '${phpfpm_ini}'. You should safely delete it before restoring this app."
fi fi
@ -68,4 +68,4 @@ sudo cp -a ./php-fpm.ini "${phpfpm_ini}"
# Reload services # Reload services
sudo systemctl reload php5-fpm sudo systemctl reload php5-fpm
sudo systemctl reload nginx sudo systemctl reload nginx
sudo yunohost app ssowatconf sudo yunohost app ssowatconf