mesh setup

This commit is contained in:
Bob Mottram 2017-09-30 20:06:36 +01:00
parent c4b77f7df3
commit 09d107f903
1 changed files with 6 additions and 6 deletions

View File

@ -458,8 +458,9 @@ function remove_user_vpn {
function mesh_setup_vpn {
vpn_generate_keys
if [ ${VPN_TLS_PORT} -ne 443 ]; then
firewall_add VPN-TLS ${VPN_TLS_PORT} tcp
if [ -d /home/fbone ]; then
cp /etc/stunnel/stunnel-client.conf /home/fbone/stunnel-client.conf
chown fbone:fbone /home/fbone/stunnel*
fi
generate_stunnel_keys
@ -501,7 +502,6 @@ function generate_stunnel_keys {
function install_stunnel {
prefix=
prefixchroot=
userhome=/home/$MY_USERNAME
if [ $rootdir ]; then
prefix=$rootdir
prefixchroot="chroot $rootdir"
@ -566,10 +566,10 @@ function install_stunnel {
systemctl enable stunnel
systemctl daemon-reload
systemctl start stunnel
fi
cp $prefix/etc/stunnel/stunnel-client.conf $prefix$userhome/stunnel-client.conf
chown $MY_USERNAME:$MY_USERNAME $prefix$userhome/stunnel*
cp /etc/stunnel/stunnel-client.conf /home/$MY_USERNAME/stunnel-client.conf
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/stunnel*
fi
}
function vpn_generate_keys {