Add backup/restore scripts

This commit is contained in:
Julien VAUBOURG
2015-07-25 16:33:38 +02:00
parent 40ba05ad1b
commit 1a9ef49ea5
4 changed files with 26 additions and 3 deletions

14
scripts/restore Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
gitcommit=$(sudo yunohost app setting hotspot gitcommit)
tmpdir=$(mktemp -dp /tmp/ hotspot-restore-XXXXX)
git clone https://github.com/labriqueinternet/hotspot_ynh.git "${tmpdir}/"
git --work-tree "${tmpdir}/" --git-dir "${tmpdir}/.git/" reset --hard "${gitcommit}"
cd "${tmpdir}/scripts/"
./upgrade
sudo rm -r "${tmpdir}/"
exit 0