mesh setup
This commit is contained in:
parent
c4b77f7df3
commit
09d107f903
|
@ -458,8 +458,9 @@ function remove_user_vpn {
|
||||||
function mesh_setup_vpn {
|
function mesh_setup_vpn {
|
||||||
vpn_generate_keys
|
vpn_generate_keys
|
||||||
|
|
||||||
if [ ${VPN_TLS_PORT} -ne 443 ]; then
|
if [ -d /home/fbone ]; then
|
||||||
firewall_add VPN-TLS ${VPN_TLS_PORT} tcp
|
cp /etc/stunnel/stunnel-client.conf /home/fbone/stunnel-client.conf
|
||||||
|
chown fbone:fbone /home/fbone/stunnel*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
generate_stunnel_keys
|
generate_stunnel_keys
|
||||||
|
@ -501,7 +502,6 @@ function generate_stunnel_keys {
|
||||||
function install_stunnel {
|
function install_stunnel {
|
||||||
prefix=
|
prefix=
|
||||||
prefixchroot=
|
prefixchroot=
|
||||||
userhome=/home/$MY_USERNAME
|
|
||||||
if [ $rootdir ]; then
|
if [ $rootdir ]; then
|
||||||
prefix=$rootdir
|
prefix=$rootdir
|
||||||
prefixchroot="chroot $rootdir"
|
prefixchroot="chroot $rootdir"
|
||||||
|
@ -566,10 +566,10 @@ function install_stunnel {
|
||||||
systemctl enable stunnel
|
systemctl enable stunnel
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl start stunnel
|
systemctl start stunnel
|
||||||
fi
|
|
||||||
|
|
||||||
cp $prefix/etc/stunnel/stunnel-client.conf $prefix$userhome/stunnel-client.conf
|
cp /etc/stunnel/stunnel-client.conf /home/$MY_USERNAME/stunnel-client.conf
|
||||||
chown $MY_USERNAME:$MY_USERNAME $prefix$userhome/stunnel*
|
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/stunnel*
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function vpn_generate_keys {
|
function vpn_generate_keys {
|
||||||
|
|
Loading…
Reference in New Issue