2016-06-14 12:25:46 +02:00
|
|
|
#!/bin/bash
|
2014-11-19 21:29:20 +01:00
|
|
|
|
2016-06-15 23:09:45 +02:00
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
|
|
set -eu
|
|
|
|
|
2016-06-18 10:25:09 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2014-11-19 21:29:20 +01:00
|
|
|
app_path=/var/www/$app
|
|
|
|
save_path=$1
|
|
|
|
|
2016-06-15 23:39:38 +02:00
|
|
|
# Source YunoHost helpers
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2014-11-19 21:29:20 +01:00
|
|
|
sudo cp $save_path/config.php $app_path/
|
2014-11-19 22:23:25 +01:00
|
|
|
sudo rm -rf $app_path/data
|
2014-11-19 21:29:20 +01:00
|
|
|
sudo cp -R $save_path/data $app_path/
|
|
|
|
sudo chown -R www-data: $app_path/data
|