mirror of
https://github.com/Nyr/openvpn-install.git
synced 2025-02-17 14:03:13 +03:00
Add initial arch support
This commit is contained in:
parent
b6f0c42b5b
commit
4dbf223446
@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS
|
# OpenVPN road warrior installer for Debian/Ubuntu,CentOS and Arch
|
||||||
|
|
||||||
# This script will work on Debian, Ubuntu, CentOS and probably other distros
|
# This script will work on Debian, Ubuntu, CentOS and probably other distros
|
||||||
# of the same families, although no support is offered for them. It isn't
|
# of the same families, although no support is offered for them. It isn't
|
||||||
# bulletproof but it will probably work if you simply want to setup a VPN on
|
# bulletproof but it will probably work if you simply want to setup a VPN on
|
||||||
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and
|
# your Debian/CentOS/Arch box. It has been designed to be as unobtrusive and
|
||||||
# universal as possible.
|
# universal as possible.
|
||||||
|
|
||||||
|
|
||||||
@ -38,6 +38,12 @@ elif [[ -e /etc/centos-release || -e /etc/redhat-release ]]; then
|
|||||||
RCLOCAL='/etc/rc.d/rc.local'
|
RCLOCAL='/etc/rc.d/rc.local'
|
||||||
# Needed for CentOS 7
|
# Needed for CentOS 7
|
||||||
chmod +x /etc/rc.d/rc.local
|
chmod +x /etc/rc.d/rc.local
|
||||||
|
else
|
||||||
|
#Else, OS is Arch
|
||||||
|
OS=arch
|
||||||
|
GROUPNAME=nobody
|
||||||
|
RCLOCAL='/etc/rc.local'
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Looks like you aren't running this installer on a Debian, Ubuntu or CentOS system"
|
echo "Looks like you aren't running this installer on a Debian, Ubuntu or CentOS system"
|
||||||
exit 5
|
exit 5
|
||||||
@ -153,8 +159,10 @@ if [[ -e /etc/openvpn/server.conf ]]; then
|
|||||||
fi
|
fi
|
||||||
if [[ "$OS" = 'debian' ]]; then
|
if [[ "$OS" = 'debian' ]]; then
|
||||||
apt-get remove --purge -y openvpn openvpn-blacklist
|
apt-get remove --purge -y openvpn openvpn-blacklist
|
||||||
else
|
elif [[ "$OS" = 'centos' ]]; then
|
||||||
yum remove openvpn -y
|
yum remove openvpn -y
|
||||||
|
elif [[ "$OS" = 'arch' ]]; then
|
||||||
|
pacman -Rs openvpn --noconfirm
|
||||||
fi
|
fi
|
||||||
rm -rf /etc/openvpn
|
rm -rf /etc/openvpn
|
||||||
rm -rf /usr/share/doc/openvpn*
|
rm -rf /usr/share/doc/openvpn*
|
||||||
@ -202,10 +210,12 @@ else
|
|||||||
if [[ "$OS" = 'debian' ]]; then
|
if [[ "$OS" = 'debian' ]]; then
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install openvpn iptables openssl ca-certificates -y
|
apt-get install openvpn iptables openssl ca-certificates -y
|
||||||
else
|
elif [[ "$OS" = 'centos' ]]; then
|
||||||
# Else, the distro is CentOS
|
|
||||||
yum install epel-release -y
|
yum install epel-release -y
|
||||||
yum install openvpn iptables openssl wget ca-certificates -y
|
yum install openvpn iptables openssl wget ca-certificates -y
|
||||||
|
else
|
||||||
|
#Arch
|
||||||
|
pacman -S openvpn iptables openssl wget ca-certificates --noconfirm
|
||||||
fi
|
fi
|
||||||
# An old version of easy-rsa was available by default in some openvpn packages
|
# An old version of easy-rsa was available by default in some openvpn packages
|
||||||
if [[ -d /etc/openvpn/easy-rsa/ ]]; then
|
if [[ -d /etc/openvpn/easy-rsa/ ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user