mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-04-15 15:04:22 +02:00
Add support for Amazon Linux 2023 out of the box (#1259)
Co-authored-by: Stanislas Lange <git@slange.me>
This commit is contained in:
parent
e2d4990ae1
commit
399c3c87b9
25
README.md
25
README.md
@ -132,18 +132,19 @@ export PASS="1"
|
|||||||
|
|
||||||
The script supports these Linux distributions:
|
The script supports these Linux distributions:
|
||||||
|
|
||||||
| | Support |
|
| | Support |
|
||||||
| ------------------ | ------- |
|
| ---------------------- | ------- |
|
||||||
| AlmaLinux 8 | ✅ |
|
| AlmaLinux 8 | ✅ |
|
||||||
| Amazon Linux 2 | ✅ |
|
| Amazon Linux 2 | ✅ |
|
||||||
| Arch Linux | ✅ |
|
| Amazon Linux >= 2023.6 | ✅ |
|
||||||
| CentOS 7 | ✅ |
|
| Arch Linux | ✅ |
|
||||||
| CentOS Stream >= 8 | ✅ 🤖 |
|
| CentOS 7 | ✅ |
|
||||||
| Debian >= 10 | ✅ 🤖 |
|
| CentOS Stream >= 8 | ✅ 🤖 |
|
||||||
| Fedora >= 35 | ✅ 🤖 |
|
| Debian >= 10 | ✅ 🤖 |
|
||||||
| Oracle Linux 8 | ✅ |
|
| Fedora >= 35 | ✅ 🤖 |
|
||||||
| Rocky Linux 8 | ✅ |
|
| Oracle Linux 8 | ✅ |
|
||||||
| Ubuntu >= 18.04 | ✅ 🤖 |
|
| Rocky Linux 8 | ✅ |
|
||||||
|
| Ubuntu >= 18.04 | ✅ 🤖 |
|
||||||
|
|
||||||
To be noted:
|
To be noted:
|
||||||
|
|
||||||
|
13
openvpn-install.sh
Executable file → Normal file
13
openvpn-install.sh
Executable file → Normal file
@ -75,11 +75,14 @@ function checkOS() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $ID == "amzn" ]]; then
|
if [[ $ID == "amzn" ]]; then
|
||||||
OS="amzn"
|
if [[ $VERSION_ID == "2" ]]; then
|
||||||
if [[ $VERSION_ID != "2" ]]; then
|
OS="amzn"
|
||||||
|
elif [[ "$(echo "$PRETTY_NAME" | cut -c 1-18)" == "Amazon Linux 2023." ]] && [[ "$(echo "$PRETTY_NAME" | cut -c 19)" -ge 6 ]]; then
|
||||||
|
OS="amzn2023"
|
||||||
|
else
|
||||||
echo "⚠️ Your version of Amazon Linux is not supported."
|
echo "⚠️ Your version of Amazon Linux is not supported."
|
||||||
echo ""
|
echo ""
|
||||||
echo "The script only support Amazon Linux 2."
|
echo "The script only support Amazon Linux 2 or Amazon Linux 2023.6+"
|
||||||
echo ""
|
echo ""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -719,6 +722,8 @@ function installOpenVPN() {
|
|||||||
elif [[ $OS == 'amzn' ]]; then
|
elif [[ $OS == 'amzn' ]]; then
|
||||||
amazon-linux-extras install -y epel
|
amazon-linux-extras install -y epel
|
||||||
yum install -y openvpn iptables openssl wget ca-certificates curl
|
yum install -y openvpn iptables openssl wget ca-certificates curl
|
||||||
|
elif [[ $OS == 'amzn2023' ]]; then
|
||||||
|
dnf install -y openvpn iptables openssl wget ca-certificates
|
||||||
elif [[ $OS == 'fedora' ]]; then
|
elif [[ $OS == 'fedora' ]]; then
|
||||||
dnf install -y openvpn iptables openssl wget ca-certificates curl policycoreutils-python-utils
|
dnf install -y openvpn iptables openssl wget ca-certificates curl policycoreutils-python-utils
|
||||||
elif [[ $OS == 'arch' ]]; then
|
elif [[ $OS == 'arch' ]]; then
|
||||||
@ -958,7 +963,7 @@ verb 3" >>/etc/openvpn/server.conf
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Finally, restart and enable OpenVPN
|
# Finally, restart and enable OpenVPN
|
||||||
if [[ $OS == 'arch' || $OS == 'fedora' || $OS == 'centos' || $OS == 'oracle' ]]; then
|
if [[ $OS == 'arch' || $OS == 'fedora' || $OS == 'centos' || $OS == 'oracle' || $OS == 'amzn2023' ]]; then
|
||||||
# Don't modify package-provided service
|
# Don't modify package-provided service
|
||||||
cp /usr/lib/systemd/system/openvpn-server@.service /etc/systemd/system/openvpn-server@.service
|
cp /usr/lib/systemd/system/openvpn-server@.service /etc/systemd/system/openvpn-server@.service
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user