1
0
mirror of synced 2024-11-27 15:26:08 +03:00

Compare commits

..

No commits in common. "571296ffb9519c513a65e406d7de09ea2bfff9c0" and "f409512d28de43a904046916b218d23475a8e805" have entirely different histories.

4 changed files with 10 additions and 22 deletions

View File

@ -104,9 +104,9 @@ jobs:
url1="https://mirrors.kernel.org/ubuntu/pool/main/n/nss"
url2="https://mirrors.kernel.org/ubuntu/pool/universe/n/nss"
deb1="libnss3_3.49.1-1ubuntu1.7_amd64.deb"
deb2="libnss3-dev_3.49.1-1ubuntu1.7_amd64.deb"
deb3="libnss3-tools_3.49.1-1ubuntu1.7_amd64.deb"
deb1="libnss3_3.49.1-1ubuntu1.6_amd64.deb"
deb2="libnss3-dev_3.49.1-1ubuntu1.6_amd64.deb"
deb3="libnss3-tools_3.49.1-1ubuntu1.6_amd64.deb"
$wg 1.deb "$url1/$deb1"
$wg 2.deb "$url1/$deb2"

View File

@ -151,7 +151,7 @@ confirm_or_abort() {
show_header() {
cat <<'EOF'
IKEv2 Script Copyright (c) 2020-2022 Lin Song 14 May 2022
IKEv2 Script Copyright (c) 2020-2022 Lin Song 8 May 2022
EOF
}
@ -1148,9 +1148,9 @@ apply_ubuntu1804_nss_fix() {
if [ "$os_type" = "ubuntu" ] && [ "$os_ver" = "bustersid" ] && [ "$os_arch" = "x86_64" ]; then
nss_url1="https://mirrors.kernel.org/ubuntu/pool/main/n/nss"
nss_url2="https://mirrors.kernel.org/ubuntu/pool/universe/n/nss"
nss_deb1="libnss3_3.49.1-1ubuntu1.7_amd64.deb"
nss_deb2="libnss3-dev_3.49.1-1ubuntu1.7_amd64.deb"
nss_deb3="libnss3-tools_3.49.1-1ubuntu1.7_amd64.deb"
nss_deb1="libnss3_3.49.1-1ubuntu1.6_amd64.deb"
nss_deb2="libnss3-dev_3.49.1-1ubuntu1.6_amd64.deb"
nss_deb3="libnss3-tools_3.49.1-1ubuntu1.6_amd64.deb"
if tmpdir=$(mktemp --tmpdir -d vpn.XXXXX 2>/dev/null); then
bigecho2 "Applying fix for NSS bug on Ubuntu 18.04..."
export DEBIAN_FRONTEND=noninteractive

View File

@ -291,17 +291,6 @@ EOF
fi
}
update_crontabs() {
if [ "$os_type" = "alpine" ]; then
cron_cmd="rc-service -c ipsec zap start"
if grep -qs "$cron_cmd" /etc/crontabs/root; then
bigecho "Updating crontabs..."
sed -i "/$cron_cmd/d" /etc/crontabs/root
touch /etc/crontabs/cron.update
fi
fi
}
remove_config_files() {
bigecho "Removing VPN configuration..."
/bin/rm -f /etc/ipsec.conf* /etc/ipsec.secrets* /etc/ppp/chap-secrets* /etc/ppp/options.xl2tpd* \
@ -317,7 +306,6 @@ remove_vpn() {
update_sysctl
update_rclocal
update_iptables_rules
update_crontabs
remove_config_files
}

View File

@ -501,7 +501,7 @@ start_services() {
service xl2tpd restart >/dev/null 2>&1
mkdir -p /etc/crontabs
cron_cmd="rc-service -c ipsec zap start"
if ! grep -qs "$cron_cmd" /etc/crontabs/root; then
if ! grep -qs "$cron_cmd" /etc/crontabs/root; then
cat >> /etc/crontabs/root <<EOF
* * * * * $cron_cmd
* * * * * sleep 15; $cron_cmd
@ -509,7 +509,7 @@ cat >> /etc/crontabs/root <<EOF
* * * * * sleep 45; $cron_cmd
EOF
touch /etc/crontabs/cron.update
fi
fi
}
show_vpn_info() {