mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
Déplacer les fichier après un exit
This commit is contained in:
parent
c8ef25de20
commit
9035ae1af3
1 changed files with 7 additions and 7 deletions
|
@ -20,10 +20,6 @@ with_mysql=$(ynh_app_setting_get "$app" with_mysql)
|
|||
sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|
||||
|| ynh_die "Path not available: ${domain}${path}"
|
||||
|
||||
# Restore sources & data
|
||||
final_path="/var/www/${app}"
|
||||
sudo cp -a ./sources "$final_path"
|
||||
|
||||
# Check configuration files php-fpm
|
||||
nginx_conf="/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
[[ -f $nginx_conf ]] && ynh_die \
|
||||
|
@ -38,6 +34,13 @@ phpfpm_ini="/etc/php5/fpm/conf.d/20-${app}.ini"
|
|||
"The PHP FPM INI configuration already exists at '${phpfpm_ini}'.
|
||||
You should safely delete it before restoring this app."
|
||||
|
||||
# Restore sources & data
|
||||
final_path="/var/www/${app}"
|
||||
sudo cp -a ./sources "$final_path"
|
||||
|
||||
# Set permissions
|
||||
sudo chown -R www-data: $final_path
|
||||
|
||||
# Restore db
|
||||
if [[ $with_mysql -eq 1 ]]; then
|
||||
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
||||
|
@ -51,9 +54,6 @@ if [[ $with_mysql -eq 1 ]]; then
|
|||
sudo sed -i "s@__DB_PWD__@$db_pwd@g" $final_path/config/connect.php
|
||||
fi
|
||||
|
||||
# Set permissions
|
||||
sudo chown -R www-data: $final_path
|
||||
|
||||
# Restore nginx configuration files
|
||||
sudo cp -a ./nginx.conf "$nginx_conf"
|
||||
# Restore php-fpm configuration files
|
||||
|
|
Loading…
Add table
Reference in a new issue