Update restore procedure

This commit is contained in:
Julien Vaubourg
2016-05-14 16:08:22 +02:00
parent c08286273b
commit e5ce4acb6a
4 changed files with 6 additions and 19 deletions

View File

@@ -1,12 +1,11 @@
#!/bin/bash
# The parameter $1 is the uncompressed restore directory location
backup_dir="${1}/apps/vpnclient"
mkdir -p /etc/openvpn/
cp -a "${backup_dir}/keys/" /etc/openvpn/
gitcommit=$(sudo yunohost app setting vpnclient gitcommit)
gitcommit=$(grep revision /etc/yunohost/apps/vpnclient/status.json | sed 's/.*"revision": "\([^"]\+\)".*/\1/')
tmpdir=$(mktemp -dp /tmp/ vpnclient-restore-XXXXX)
git clone https://github.com/labriqueinternet/vpnclient_ynh.git "${tmpdir}/"