restore 456 B

12345678910111213141516
  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. # Restart webserver
  12. sudo service nginx reload