Cleanup
This commit is contained in:
parent
cf7737238d
commit
804211c101
@ -25,7 +25,7 @@ Libreswan 支持通过使用 RSA 签名算法的 X.509 Machine Certificates 来
|
||||
|
||||
```bash
|
||||
$ PUBLIC_IP=$(wget -t 3 -T 15 -qO- http://ipv4.icanhazip.com)
|
||||
$ echo "$PUBLIC_IP"
|
||||
$ printf '%s' "$PUBLIC_IP"
|
||||
(检查显示的公共 IP)
|
||||
```
|
||||
|
||||
|
@ -25,7 +25,7 @@ Before continuing, make sure you have successfully <a href="https://github.com/h
|
||||
|
||||
```bash
|
||||
$ PUBLIC_IP=$(wget -t 3 -T 15 -qO- http://ipv4.icanhazip.com)
|
||||
$ echo "$PUBLIC_IP"
|
||||
$ printf '%s' "$PUBLIC_IP"
|
||||
(Check the displayed public IP)
|
||||
```
|
||||
|
||||
|
@ -24,8 +24,8 @@ vpnupgrade() {
|
||||
|
||||
os_type="$(lsb_release -si 2>/dev/null)"
|
||||
if [ -z "$os_type" ]; then
|
||||
[ -f /etc/os-release ] && os_type="$(. /etc/os-release && echo "$ID")"
|
||||
[ -f /etc/lsb-release ] && os_type="$(. /etc/lsb-release && echo "$DISTRIB_ID")"
|
||||
[ -f /etc/os-release ] && os_type="$(. /etc/os-release && printf '%s' "$ID")"
|
||||
[ -f /etc/lsb-release ] && os_type="$(. /etc/lsb-release && printf '%s' "$DISTRIB_ID")"
|
||||
fi
|
||||
if ! printf '%s' "$os_type" | head -n 1 | grep -qiF -e ubuntu -e debian -e raspbian; then
|
||||
exiterr "This script only supports Ubuntu and Debian."
|
||||
|
@ -50,8 +50,8 @@ vpnsetup() {
|
||||
|
||||
os_type="$(lsb_release -si 2>/dev/null)"
|
||||
if [ -z "$os_type" ]; then
|
||||
[ -f /etc/os-release ] && os_type="$(. /etc/os-release && echo "$ID")"
|
||||
[ -f /etc/lsb-release ] && os_type="$(. /etc/lsb-release && echo "$DISTRIB_ID")"
|
||||
[ -f /etc/os-release ] && os_type="$(. /etc/os-release && printf '%s' "$ID")"
|
||||
[ -f /etc/lsb-release ] && os_type="$(. /etc/lsb-release && printf '%s' "$DISTRIB_ID")"
|
||||
fi
|
||||
if ! printf '%s' "$os_type" | head -n 1 | grep -qiF -e ubuntu -e debian -e raspbian; then
|
||||
exiterr "This script only supports Ubuntu and Debian."
|
||||
|
@ -423,6 +423,7 @@ else
|
||||
systemctl --now mask firewalld 2>/dev/null
|
||||
systemctl enable iptables fail2ban 2>/dev/null
|
||||
fi
|
||||
|
||||
if ! grep -qs "hwdsl2 VPN script" /etc/rc.local; then
|
||||
if [ -f /etc/rc.local ]; then
|
||||
conf_bk "/etc/rc.local"
|
||||
|
Loading…
Reference in New Issue
Block a user