1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00

Accolade sur les variables

This commit is contained in:
magikcypress 2017-03-14 13:20:08 +01:00
parent 5df0384e3f
commit 5cc3bcd1d8

View file

@ -16,13 +16,13 @@ path=$(ynh_app_setting_get $app path)
is_public=$(ynh_app_setting_get $app is_public) is_public=$(ynh_app_setting_get $app is_public)
# Check domain/path availability # Check domain/path availability
sudo yunohost app checkurl "${domain}${path}" -a "$app" \ sudo yunohost app checkurl "${domain}${path}" -a "${app}" \
|| ynh_die "Path not available: ${domain}${path}" || ynh_die "Path not available: ${domain}${path}"
# Check $final_path # Check $final_path
final_path="/var/www/${app}" final_path="/var/www/${app}"
if [ -d $final_path ]; then if [ -d $final_path ]; then
ynh_die "There is already a directory: $final_path" ynh_die "There is already a directory: ${final_path}"
fi fi
# Check configuration files nginx # Check configuration files nginx
@ -42,18 +42,19 @@ if [ -f $phpfpm_ini ]; then
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 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 nginx reload sudo service nginx reload
sudo service php5-fpm reload sudo service php5-fpm reload
sudo yunohost app ssowatconf sudo yunohost app ssowatconf