Add backup/restore scripts

This commit is contained in:
Julien VAUBOURG
2015-07-25 16:33:57 +02:00
parent 99f5652af4
commit 6bc8691d4d
4 changed files with 37 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This is an upgrade?
upgrade=$([ "$VPNCLIENT_UPGRADE" == 1 ] && echo true || echo false)
upgrade=$([ "${VPNCLIENT_UPGRADE}" == 1 ] && echo true || echo false)
# Retrieve arguments
domain=${1}
@@ -55,7 +55,7 @@ fi
if ! $upgrade; then
# Save arguments
sudo yunohost app setting vpnclient service_enabled -v 1
sudo yunohost app setting vpnclient service_enabled -v 0
sudo yunohost app setting vpnclient server_name -v "${server_name}"
sudo yunohost app setting vpnclient server_port -v 1194
sudo yunohost app setting vpnclient server_proto -v udp
@@ -66,6 +66,10 @@ if ! $upgrade; then
fi
# Save git commit
gitcommit=$(git rev-parse HEAD)
sudo yunohost app setting vpnclient gitcommit -v "${gitcommit}"
# Install IPv6 scripts
sudo install -o root -g root -m 0755 ../conf/ipv6_expanded /usr/local/bin/
sudo install -o root -g root -m 0755 ../conf/ipv6_compressed /usr/local/bin/