using new helpers and script formatting

This commit is contained in:
Keoma Brun
2018-04-06 23:55:12 +02:00
parent 35f38ec86c
commit 809dc19c80
7 changed files with 173 additions and 60 deletions

View File

@@ -1,5 +1,24 @@
#!/bin/bash
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
if [ ! -e _common.sh ]; then
# Fetch helpers file if not in current directory
cp ../settings/scripts/_common.sh ./_common.sh
chmod a+rx _common.sh
fi
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
backup_dir="${1}/apps/vpnclient"
sudo mkdir -p /etc/openvpn/