refactoring, permissions
This commit is contained in:
parent
a424e43d6f
commit
e67382055b
0
ipsec/autostart.sh
Normal file → Executable file
0
ipsec/autostart.sh
Normal file → Executable file
0
ipsec/checkserver.sh
Normal file → Executable file
0
ipsec/checkserver.sh
Normal file → Executable file
@ -6,7 +6,6 @@ XL2TPDCONFIG=/etc/xl2tpd/xl2tpd.conf
|
|||||||
PPPCONFIG=/etc/ppp/options.xl2tpd
|
PPPCONFIG=/etc/ppp/options.xl2tpd
|
||||||
CHAPSECRETS=/etc/ppp/chap-secrets
|
CHAPSECRETS=/etc/ppp/chap-secrets
|
||||||
IPTABLES=/etc/iptables.rules
|
IPTABLES=/etc/iptables.rules
|
||||||
RCLOCAL=/etc/rc.local
|
|
||||||
SECRETSFILE=/etc/ipsec.secrets
|
SECRETSFILE=/etc/ipsec.secrets
|
||||||
CHECKSERVER=/etc/xl2tpd/checkserver.sh
|
CHECKSERVER=/etc/xl2tpd/checkserver.sh
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Installing strongSwan and xl2tp server..."
|
echo "Installing strongSwan and xl2tp server..."
|
||||||
apt-get install strongswan xl2tpd
|
apt-get install strongswan xl2tpd cron iptables procps
|
||||||
|
|
||||||
ADDUSER="no"
|
ADDUSER="no"
|
||||||
ANSUSER="yes"
|
ANSUSER="yes"
|
||||||
|
|||||||
@ -17,7 +17,7 @@ if [ $? -ne 0 ]; then
|
|||||||
echo "@reboot $RESTOREPATH <$IPTABLES >/dev/null 2>&1" >> $TMPFILE
|
echo "@reboot $RESTOREPATH <$IPTABLES >/dev/null 2>&1" >> $TMPFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OPENVPNPRESENTS=$(grep "$CHECKSERVER" $TMPFILE)
|
SERVERSPRESENTS=$(grep "$CHECKSERVER" $TMPFILE)
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "*/5 * * * * $CHECKSERVER >/dev/null 2>&1" >> $TMPFILE
|
echo "*/5 * * * * $CHECKSERVER >/dev/null 2>&1" >> $TMPFILE
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -5,7 +5,6 @@ OPENVPNDIR=/etc/openvpn
|
|||||||
OPENVPNCONFIG=$OPENVPNDIR/openvpn-server.conf
|
OPENVPNCONFIG=$OPENVPNDIR/openvpn-server.conf
|
||||||
CADIR=$OPENVPNDIR/easy-rsa
|
CADIR=$OPENVPNDIR/easy-rsa
|
||||||
IPTABLES=/etc/iptables.rules
|
IPTABLES=/etc/iptables.rules
|
||||||
RCLOCAL=/etc/rc.local
|
|
||||||
NOBODYGROUP=nogroup
|
NOBODYGROUP=nogroup
|
||||||
CHECKSERVER=$OPENVPNDIR/checkserver.sh
|
CHECKSERVER=$OPENVPNDIR/checkserver.sh
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ fi
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Installing OpenVPN..."
|
echo "Installing OpenVPN..."
|
||||||
apt-get install openvpn easy-rsa cron
|
apt-get install openvpn easy-rsa cron iptables procps
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Configuring routing..."
|
echo "Configuring routing..."
|
||||||
|
|||||||
2
pptp/autostart.sh
Normal file → Executable file
2
pptp/autostart.sh
Normal file → Executable file
@ -17,7 +17,7 @@ if [ $? -ne 0 ]; then
|
|||||||
echo "@reboot $RESTOREPATH <$IPTABLES >/dev/null 2>&1" >> $TMPFILE
|
echo "@reboot $RESTOREPATH <$IPTABLES >/dev/null 2>&1" >> $TMPFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PPTPDPRESENTS=$(grep "$CHECKSERVER" $TMPFILE)
|
SERVERSPRESENTS=$(grep "$CHECKSERVER" $TMPFILE)
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "*/5 * * * * $CHECKSERVER >/dev/null 2>&1" >> $TMPFILE
|
echo "*/5 * * * * $CHECKSERVER >/dev/null 2>&1" >> $TMPFILE
|
||||||
fi
|
fi
|
||||||
|
|||||||
0
pptp/checkserver.sh
Normal file → Executable file
0
pptp/checkserver.sh
Normal file → Executable file
@ -5,7 +5,6 @@ PPTPDCONFIG=/etc/pptpd.conf
|
|||||||
PPTPOPTIONS=/etc/ppp/options.pptp
|
PPTPOPTIONS=/etc/ppp/options.pptp
|
||||||
CHAPSECRETS=/etc/ppp/chap-secrets
|
CHAPSECRETS=/etc/ppp/chap-secrets
|
||||||
IPTABLES=/etc/iptables.rules
|
IPTABLES=/etc/iptables.rules
|
||||||
RCLOCAL=/etc/rc.local
|
|
||||||
CHECKSERVER=/etc/ppp/checkserver.sh
|
CHECKSERVER=/etc/ppp/checkserver.sh
|
||||||
|
|
||||||
LOCALPREFIX="172.16"
|
LOCALPREFIX="172.16"
|
||||||
|
|||||||
@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Installing PPTP server..."
|
echo "Installing PPTP server..."
|
||||||
apt-get install pptpd cron
|
apt-get install pptpd cron iptables procps
|
||||||
|
|
||||||
ADDUSER="no"
|
ADDUSER="no"
|
||||||
ANSUSER="yes"
|
ANSUSER="yes"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user