mirror of
https://github.com/YunoHost-Apps/prestashop_ynh.git
synced 2024-09-03 20:06:39 +02:00
Corrige la bêtise sur la vérif des fichiers de conf
This commit is contained in:
parent
2627610cfb
commit
daf5e830c5
2 changed files with 10 additions and 10 deletions
|
@ -67,7 +67,7 @@ SETUP_SOURCE () { # Télécharge la source, décompresse et copie dans $final_pa
|
||||||
src_url=$(cat ../conf/app.src | grep SOURCE_URL | cut -d= -f2)
|
src_url=$(cat ../conf/app.src | grep SOURCE_URL | cut -d= -f2)
|
||||||
src_checksum=$(cat ../conf/app.src | grep SOURCE_SUM | cut -d= -f2)
|
src_checksum=$(cat ../conf/app.src | grep SOURCE_SUM | cut -d= -f2)
|
||||||
# Download sources from the upstream
|
# Download sources from the upstream
|
||||||
wget -nv -O source.zip $src_url
|
sudo wget -nv -O source.zip $src_url
|
||||||
# Vérifie la somme de contrôle de la source téléchargée.
|
# Vérifie la somme de contrôle de la source téléchargée.
|
||||||
echo "$src_checksum source.zip" | md5sum -c --status || ynh_die "Corrupt source"
|
echo "$src_checksum source.zip" | md5sum -c --status || ynh_die "Corrupt source"
|
||||||
# Extract source into the app dir
|
# Extract source into the app dir
|
||||||
|
|
|
@ -27,26 +27,26 @@ if [ -d $final_path ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check configuration files nginx
|
# Check configuration files nginx
|
||||||
nginx_conf="/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
nginx_conf="/etc/nginx/conf.d/${domain}.d/nginx.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."
|
||||||
|
|
||||||
# Check configuration files php-fpm
|
# Check configuration files php-fpm
|
||||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
phpfpm_conf="/etc/php5/fpm/pool.d/php-fpm.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/20-${app}.ini"
|
phpfpm_ini="/etc/php5/fpm/conf.d/php-fpm.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
|
||||||
|
|
||||||
# Restore sources & data
|
# Restore sources & data
|
||||||
sudo cp -a ./sources "$final_path"
|
sudo cp -a ./sources "${final_path}"
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
sudo chown -R www-data: $final_path
|
sudo chown -R www-data: "${final_path}"
|
||||||
|
|
||||||
# Restore db
|
# Restore db
|
||||||
# if [[ $with_mysql -eq 1 ]]; then
|
# if [[ $with_mysql -eq 1 ]]; then
|
||||||
|
@ -58,10 +58,10 @@ sudo rm -f "./db.sql"
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
# Restore nginx configuration files
|
# Restore nginx configuration files
|
||||||
sudo cp -a ./nginx.conf "$nginx_conf"
|
sudo cp -a ./nginx.conf "${nginx_conf}"
|
||||||
# Restore php-fpm configuration files
|
# Restore php-fpm configuration files
|
||||||
sudo cp -a ./php-fpm.conf "$phpfpm_conf"
|
sudo cp -a ./php-fpm.conf "${phpfpm_conf}"
|
||||||
sudo cp -a ./php-fpm.ini "$phpfpm_ini"
|
sudo cp -a ./php-fpm.ini "${phpfpm_ini}"
|
||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
sudo service php5-fpm reload || true
|
sudo service php5-fpm reload || true
|
||||||
|
|
Loading…
Add table
Reference in a new issue