mirror of
https://github.com/teddysun/across.git
synced 2025-01-19 06:19:35 +08:00
Update comments
Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
parent
a16c60e43b
commit
f80dff12a3
@ -185,14 +185,18 @@ cat > /etc/ipsec.secrets <<EOF
|
|||||||
%any %any : PSK "${VPN_IPSEC_PSK}"
|
%any %any : PSK "${VPN_IPSEC_PSK}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > /etc/ppp/chap-secrets <<EOF
|
if ! grep -qw "${VPN_USER}" /etc/ppp/chap-secrets; then
|
||||||
|
cat > /etc/ppp/chap-secrets <<EOF
|
||||||
${VPN_USER} l2tpd ${VPN_PASSWORD} *
|
${VPN_USER} l2tpd ${VPN_PASSWORD} *
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
VPN_PASSWORD_ENC=$(openssl passwd -1 "${VPN_PASSWORD}")
|
VPN_PASSWORD_ENC=$(openssl passwd -1 "${VPN_PASSWORD}")
|
||||||
cat > /etc/ipsec.d/passwd <<EOF
|
if ! grep -qw "${VPN_USER}" /etc/ipsec.d/passwd; then
|
||||||
|
cat > /etc/ipsec.d/passwd <<EOF
|
||||||
${VPN_USER}:${VPN_PASSWORD_ENC}:xauth-psk
|
${VPN_USER}:${VPN_PASSWORD_ENC}:xauth-psk
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
chmod 600 /etc/ipsec.secrets /etc/ppp/chap-secrets /etc/ipsec.d/passwd
|
chmod 600 /etc/ipsec.secrets /etc/ppp/chap-secrets /etc/ipsec.d/passwd
|
||||||
|
|
||||||
|
@ -185,14 +185,18 @@ cat > /etc/ipsec.secrets <<EOF
|
|||||||
%any %any : PSK "${VPN_IPSEC_PSK}"
|
%any %any : PSK "${VPN_IPSEC_PSK}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > /etc/ppp/chap-secrets <<EOF
|
if ! grep -qw "${VPN_USER}" /etc/ppp/chap-secrets; then
|
||||||
|
cat > /etc/ppp/chap-secrets <<EOF
|
||||||
${VPN_USER} l2tpd ${VPN_PASSWORD} *
|
${VPN_USER} l2tpd ${VPN_PASSWORD} *
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
VPN_PASSWORD_ENC=$(openssl passwd -1 "${VPN_PASSWORD}")
|
VPN_PASSWORD_ENC=$(openssl passwd -1 "${VPN_PASSWORD}")
|
||||||
cat > /etc/ipsec.d/passwd <<EOF
|
if ! grep -qw "${VPN_USER}" /etc/ipsec.d/passwd; then
|
||||||
|
cat > /etc/ipsec.d/passwd <<EOF
|
||||||
${VPN_USER}:${VPN_PASSWORD_ENC}:xauth-psk
|
${VPN_USER}:${VPN_PASSWORD_ENC}:xauth-psk
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
chmod 600 /etc/ipsec.secrets /etc/ppp/chap-secrets /etc/ipsec.d/passwd
|
chmod 600 /etc/ipsec.secrets /etc/ppp/chap-secrets /etc/ipsec.d/passwd
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user