From 27e851ec474559667b15497d57482d1af164cc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Garrigue?= Date: Fri, 21 Aug 2015 13:33:45 +0000 Subject: [PATCH] Re-enabled YunoHost shortcut to dashboard now that nginx conf do works --- README.md | 8 ++++++-- conf/nginx.conf | 2 +- scripts/install | 3 +-- scripts/restore | 2 ++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c4302db..c9df696 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,12 @@ Currently following [this guide](https://yunohost.org/#/packaging_apps_fr) to pa # TODO -- Test backup -- Test restore - Add a 'protected' value to 'public' argument, so admin interface is protected - Replace 'password' argument by http_auth or ldap authent +# Backup & Restore + +Default YunoHost installation got a small bug that prevent `yunohost backup create`, here's the fix: `sed -i -e "302s/logging/logger/" /usr/lib/moulinette/yunohost/backup.py` + +Yet it doesn't seems to save apps, at least in my test environment. To be investigated. + diff --git a/conf/nginx.conf b/conf/nginx.conf index 57e76b5..69138e8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -12,5 +12,5 @@ location YNH_WWW_PATH { } # Include SSOWAT user panel. - # include conf.d/yunohost_panel.conf.inc; + include conf.d/yunohost_panel.conf.inc; } diff --git a/scripts/install b/scripts/install index 21b23f3..b360158 100755 --- a/scripts/install +++ b/scripts/install @@ -29,13 +29,12 @@ sudo yunohost app setting $app admin -v "$admin" sudo yunohost app setting $app admin_password -v "$admin_password" sudo yunohost app setting $app is_public -v "$is_public" - # Make sure we got the tools we need for this install sudo apt-get install -y curl wget sed # Initialize database and store mysql password for upgrade db_password=`sudo yunohost app initdb $app | tr -d '\n'` -sudo yunohost app setting $app mysqlpwd -v $db_password +sudo yunohost app setting $app db_password -v $db_password # Get sources sudo wget -nv http://download.dotclear.org/latest.tar.gz -O $app.tgz diff --git a/scripts/restore b/scripts/restore index 876dd83..171ede0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,6 +10,8 @@ backup_dir=$1/apps/$app sudo cp -a $backup_dir/sources/. /var/www/$app # Restore database +root_pwd=$(sudo cat /etc/yunohost/mysql) +mysql -u root -p$root_pwd -e "DROP DATABASE $app ;" db_password=$(sudo yunohost app setting $app db_password) sudo yunohost app initdb $app -p "$db_password" -s $backup_dir/dump.sql