Add backup/restore scripts
This commit is contained in:
14
scripts/restore
Normal file
14
scripts/restore
Normal 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
|
||||
Reference in New Issue
Block a user