mesh setup
This commit is contained in:
parent
c4b77f7df3
commit
09d107f903
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue