mirror of
https://github.com/angristan/openvpn-install.git
synced 2025-12-14 16:17:03 +01:00
Add openSUSE Tumbleweed/Leap support (#1166)
<!--- ❗️ Please read ❗️ ➡️ Please make sure you've followed the guidelines: https://github.com/angristan/openvpn-install#contributing ✅ Please make sure your changes are tested and working 🗣️ Please avoid large PRs, and discuss changes in a GitHub issue first ✋ If the changes are too big and not in line with the project, they will probably be rejected. Remember that this script is meant to be simple and easy to use. ---> --------- Co-authored-by: Stanislas Lange <git@slange.me>
This commit is contained in:
4
.github/workflows/docker-test.yml
vendored
4
.github/workflows/docker-test.yml
vendored
@@ -56,6 +56,10 @@ jobs:
|
||||
image: almalinux:10
|
||||
- name: archlinux
|
||||
image: archlinux:latest
|
||||
- name: opensuse-leap-16.0
|
||||
image: opensuse/leap:16.0
|
||||
- name: opensuse-tumbleweed
|
||||
image: opensuse/tumbleweed
|
||||
- name: oraclelinux-8
|
||||
image: oraclelinux:8
|
||||
- name: oraclelinux-9
|
||||
|
||||
8
Makefile
8
Makefile
@@ -111,6 +111,12 @@ test-arch:
|
||||
test-centos-stream-9:
|
||||
$(MAKE) test BASE_IMAGE=quay.io/centos/centos:stream9
|
||||
|
||||
test-opensuse-leap:
|
||||
$(MAKE) test BASE_IMAGE=opensuse/leap:16.0
|
||||
|
||||
test-opensuse-tumbleweed:
|
||||
$(MAKE) test BASE_IMAGE=opensuse/tumbleweed
|
||||
|
||||
# Test all distributions (runs sequentially)
|
||||
test-all:
|
||||
$(MAKE) test-ubuntu-18.04
|
||||
@@ -130,3 +136,5 @@ test-all:
|
||||
$(MAKE) test-amazon-2023
|
||||
$(MAKE) test-arch
|
||||
$(MAKE) test-centos-stream-9
|
||||
$(MAKE) test-opensuse-leap
|
||||
$(MAKE) test-opensuse-tumbleweed
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||

|
||||
[](https://saythanks.io/to/angristan)
|
||||
|
||||
OpenVPN installer for Debian, Ubuntu, Fedora, CentOS, Amazon Linux, Arch Linux, Oracle Linux, Rocky Linux and AlmaLinux.
|
||||
OpenVPN installer for Debian, Ubuntu, Fedora, openSUSE, CentOS, Amazon Linux, Arch Linux, Oracle Linux, Rocky Linux and AlmaLinux.
|
||||
|
||||
This script will let you setup your own secure VPN server in just a few seconds.
|
||||
|
||||
@@ -148,13 +148,15 @@ export PASS="1"
|
||||
The script supports these Linux distributions:
|
||||
|
||||
| | Support |
|
||||
| ------------------ | ------- |
|
||||
| ------------------- | ------- |
|
||||
| AlmaLinux >= 8 | ✅ 🤖 |
|
||||
| Amazon Linux 2023 | ✅ 🤖 |
|
||||
| Arch Linux | ✅ 🤖 |
|
||||
| CentOS Stream >= 8 | ✅ 🤖 |
|
||||
| Debian >= 11 | ✅ 🤖 |
|
||||
| Fedora >= 40 | ✅ 🤖 |
|
||||
| openSUSE Leap >= 16 | ✅ 🤖 |
|
||||
| openSUSE Tumbleweed | ✅ 🤖 |
|
||||
| Oracle Linux >= 8 | ✅ 🤖 |
|
||||
| Rocky Linux >= 8 | ✅ 🤖 |
|
||||
| Ubuntu >= 18.04 | ✅ 🤖 |
|
||||
|
||||
@@ -189,11 +189,21 @@ function checkOS() {
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif [[ -e /etc/system-release ]]; then
|
||||
elif [[ -e /etc/os-release ]]; then
|
||||
source /etc/os-release
|
||||
if [[ $ID == "fedora" || $ID_LIKE == "fedora" ]]; then
|
||||
OS="fedora"
|
||||
fi
|
||||
if [[ $ID == "opensuse-tumbleweed" ]]; then
|
||||
OS="opensuse"
|
||||
fi
|
||||
if [[ $ID == "opensuse-leap" ]]; then
|
||||
OS="opensuse"
|
||||
if [[ ${VERSION_ID%.*} -lt 16 ]]; then
|
||||
log_info "The script only supports openSUSE Leap 16+."
|
||||
log_fatal "Your version of openSUSE Leap is not supported."
|
||||
fi
|
||||
fi
|
||||
if [[ $ID == "centos" || $ID == "rocky" || $ID == "almalinux" ]]; then
|
||||
OS="centos"
|
||||
fi
|
||||
@@ -213,10 +223,13 @@ function checkOS() {
|
||||
log_fatal "Your version of Amazon Linux is not supported."
|
||||
fi
|
||||
fi
|
||||
if [[ $ID == "arch" ]]; then
|
||||
OS="arch"
|
||||
fi
|
||||
elif [[ -e /etc/arch-release ]]; then
|
||||
OS=arch
|
||||
else
|
||||
log_fatal "It looks like you aren't running this installer on a Debian, Ubuntu, Fedora, CentOS, Amazon Linux 2023, Oracle Linux, Arch Linux, Rocky Linux or AlmaLinux system."
|
||||
log_fatal "It looks like you aren't running this installer on a Debian, Ubuntu, Fedora, openSUSE, CentOS, Amazon Linux 2023, Oracle Linux, Arch Linux, Rocky Linux or AlmaLinux system."
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -363,6 +376,8 @@ function installUnbound() {
|
||||
run_cmd "Installing Unbound" yum install -y unbound
|
||||
elif [[ $OS =~ (fedora|amzn2023) ]]; then
|
||||
run_cmd "Installing Unbound" dnf install -y unbound
|
||||
elif [[ $OS == "opensuse" ]]; then
|
||||
run_cmd "Installing Unbound" zypper install -y unbound
|
||||
elif [[ $OS == "arch" ]]; then
|
||||
run_cmd "Installing Unbound" pacman -Syu --noconfirm unbound
|
||||
fi
|
||||
@@ -419,6 +434,13 @@ function installUnbound() {
|
||||
echo ' access-control: fd42:42:42:42::/112 allow'
|
||||
echo ' private-address: fd42:42:42:42::/112'
|
||||
fi
|
||||
|
||||
# Disable remote-control (requires SSL certs on openSUSE)
|
||||
if [[ $OS == "opensuse" ]]; then
|
||||
echo ''
|
||||
echo 'remote-control:'
|
||||
echo ' control-enable: no'
|
||||
fi
|
||||
} >/etc/unbound/unbound.conf.d/openvpn.conf
|
||||
|
||||
run_cmd "Enabling Unbound service" systemctl enable unbound
|
||||
@@ -964,6 +986,8 @@ function installOpenVPN() {
|
||||
run_cmd "Installing OpenVPN" dnf install -y openvpn iptables openssl ca-certificates curl
|
||||
elif [[ $OS == 'fedora' ]]; then
|
||||
run_cmd "Installing OpenVPN" dnf install -y openvpn iptables openssl ca-certificates curl policycoreutils-python-utils
|
||||
elif [[ $OS == 'opensuse' ]]; then
|
||||
run_cmd "Installing OpenVPN" zypper install -y openvpn iptables openssl ca-certificates curl
|
||||
elif [[ $OS == 'arch' ]]; then
|
||||
run_cmd "Installing OpenVPN" pacman --needed --noconfirm -Syu openvpn iptables openssl ca-certificates curl
|
||||
fi
|
||||
@@ -1767,6 +1791,8 @@ function removeUnbound() {
|
||||
run_cmd "Removing Unbound" yum remove -y unbound
|
||||
elif [[ $OS =~ (fedora|amzn2023) ]]; then
|
||||
run_cmd "Removing Unbound" dnf remove -y unbound
|
||||
elif [[ $OS == 'opensuse' ]]; then
|
||||
run_cmd "Removing Unbound" zypper remove -y unbound
|
||||
fi
|
||||
|
||||
run_cmd "Removing Unbound config" rm -rf /etc/unbound/
|
||||
@@ -1793,6 +1819,7 @@ function removeOpenVPN() {
|
||||
# Remove customised service
|
||||
run_cmd "Removing service file" rm /etc/systemd/system/openvpn-server@.service
|
||||
else
|
||||
# Debian, Ubuntu, openSUSE use openvpn@server
|
||||
run_cmd "Disabling OpenVPN service" systemctl disable openvpn@server
|
||||
run_cmd "Stopping OpenVPN service" systemctl stop openvpn@server
|
||||
# Remove customised service
|
||||
@@ -1845,6 +1872,8 @@ function removeOpenVPN() {
|
||||
run_cmd "Removing OpenVPN" dnf remove -y openvpn
|
||||
# Disable Copr repo
|
||||
run_cmd "Disabling OpenVPN Copr repo" dnf copr disable -y @OpenVPN/openvpn-release-2.6 2>/dev/null || true
|
||||
elif [[ $OS == 'opensuse' ]]; then
|
||||
run_cmd "Removing OpenVPN" zypper remove -y openvpn
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
|
||||
@@ -25,6 +25,10 @@ RUN if command -v apt-get >/dev/null; then \
|
||||
pacman -Syu --noconfirm \
|
||||
iproute2 iptables curl procps-ng bind \
|
||||
&& pacman -Scc --noconfirm; \
|
||||
elif command -v zypper >/dev/null; then \
|
||||
zypper install -y \
|
||||
iproute2 iptables curl procps systemd tar gzip bind-utils gawk \
|
||||
&& zypper clean -a; \
|
||||
fi
|
||||
|
||||
# Create TUN device (will be mounted at runtime)
|
||||
|
||||
Reference in New Issue
Block a user