restore 697 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. app=ynhexample
  3. # The parameter $1 is the uncompressed restore directory location
  4. backup_dir=$1/apps/$app
  5. # Restore sources & data
  6. sudo cp -a $backup_dir/sources/. /var/www/$app
  7. # Restore Nginx and YunoHost parameters
  8. sudo cp -a $backup_dir/yunohost/. /etc/yunohost/apps/$app
  9. domain=$(sudo yunohost app setting $app domain)
  10. sudo cp -a $backup_dir/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
  11. # If a dedicated php-fpm process is used :
  12. # Copy dedicated php-fpm process from backup folder to the right location
  13. # And restart service
  14. #
  15. #sudo cp -a $backup_dir/php-fpm.conf /etc/php5/fpm/pool.d/$app.conf
  16. #sudo service php5-fpm reload
  17. # Restart webserver
  18. sudo service nginx reload