Update comments

This commit is contained in:
Teddysun 2019-08-14 22:28:03 +09:00
parent 1cd9ef402b
commit 2356d4a4ba
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D
2 changed files with 4 additions and 4 deletions

View File

@ -185,14 +185,14 @@ cat > /etc/ipsec.secrets <<EOF
%any %any : PSK "${VPN_IPSEC_PSK}" %any %any : PSK "${VPN_IPSEC_PSK}"
EOF EOF
if ! grep -qw "${VPN_USER}" /etc/ppp/chap-secrets; then if ! grep -qw "${VPN_USER}" /etc/ppp/chap-secrets 2>/dev/null; then
cat > /etc/ppp/chap-secrets <<EOF cat > /etc/ppp/chap-secrets <<EOF
${VPN_USER} l2tpd ${VPN_PASSWORD} * ${VPN_USER} l2tpd ${VPN_PASSWORD} *
EOF EOF
fi fi
VPN_PASSWORD_ENC=$(openssl passwd -1 "${VPN_PASSWORD}") VPN_PASSWORD_ENC=$(openssl passwd -1 "${VPN_PASSWORD}")
if ! grep -qw "${VPN_USER}" /etc/ipsec.d/passwd; then if ! grep -qw "${VPN_USER}" /etc/ipsec.d/passwd 2>/dev/null; then
cat > /etc/ipsec.d/passwd <<EOF cat > /etc/ipsec.d/passwd <<EOF
${VPN_USER}:${VPN_PASSWORD_ENC}:xauth-psk ${VPN_USER}:${VPN_PASSWORD_ENC}:xauth-psk
EOF EOF

View File

@ -185,14 +185,14 @@ cat > /etc/ipsec.secrets <<EOF
%any %any : PSK "${VPN_IPSEC_PSK}" %any %any : PSK "${VPN_IPSEC_PSK}"
EOF EOF
if ! grep -qw "${VPN_USER}" /etc/ppp/chap-secrets; then if ! grep -qw "${VPN_USER}" /etc/ppp/chap-secrets 2>/dev/null; then
cat > /etc/ppp/chap-secrets <<EOF cat > /etc/ppp/chap-secrets <<EOF
${VPN_USER} l2tpd ${VPN_PASSWORD} * ${VPN_USER} l2tpd ${VPN_PASSWORD} *
EOF EOF
fi fi
VPN_PASSWORD_ENC=$(openssl passwd -1 "${VPN_PASSWORD}") VPN_PASSWORD_ENC=$(openssl passwd -1 "${VPN_PASSWORD}")
if ! grep -qw "${VPN_USER}" /etc/ipsec.d/passwd; then if ! grep -qw "${VPN_USER}" /etc/ipsec.d/passwd 2>/dev/null; then
cat > /etc/ipsec.d/passwd <<EOF cat > /etc/ipsec.d/passwd <<EOF
${VPN_USER}:${VPN_PASSWORD_ENC}:xauth-psk ${VPN_USER}:${VPN_PASSWORD_ENC}:xauth-psk
EOF EOF