-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ArchLinux support. #2
Changes from 1 commit
6e2b5cb
9b26180
cc657fa
358e80b
98ca79a
f3ff29d
c659a47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,24 @@ elif [[ -e /etc/centos-release || -e /etc/redhat-release ]]; then | |
RCLOCAL='/etc/rc.d/rc.local' | ||
# Needed for CentOS 7 | ||
chmod +x /etc/rc.d/rc.local | ||
elif [[ -e /etc/arch-release ]]; then | ||
OS=arch | ||
RCLOCAL='/etc/rc.local' | ||
# Needed for rc.local support on ArchLinux | ||
echo "[Unit] | ||
Description=/etc/rc.local compatibility | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/etc/rc.local | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target" > /etc/systemd/system/rc-local.service | ||
systemctl enable rc-local.service | ||
touch /etc/rc.local | ||
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, CentOS or ArchLinux system" | ||
exit 4 | ||
fi | ||
|
||
|
@@ -163,6 +179,8 @@ if [[ -e /etc/openvpn/server.conf ]]; then | |
fi | ||
if [[ "$OS" = 'debian' ]]; then | ||
apt-get remove --purge -y openvpn openvpn-blacklist | ||
elif [[ "$OS" = 'arch' ]]; then | ||
pacman -R openvpn --noconfirm | ||
else | ||
yum remove openvpn -y | ||
fi | ||
|
@@ -264,10 +282,25 @@ else | |
# Ubuntu >= 16.04 and Debian > 8 have OpenVPN > 2.3.3 without the need of a third party repository. | ||
# The we install OpenVPN | ||
apt-get install openvpn iptables openssl wget ca-certificates curl -y | ||
else | ||
# Else, the distro is CentOS | ||
elif [[ "$OS" = 'centos' ]]; then | ||
yum install epel-release -y | ||
yum install openvpn iptables openssl wget ca-certificates curl -y | ||
else | ||
# Else, the distro is ArchLinux | ||
echo "" | ||
echo "" | ||
echo "As you're using ArchLinux, I need to update the packages on your system to install whose I need." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With APT, when a package requires dependencies, and those dependencies are installed and have updates availble, they're updated when the package is installed. In the same way, when an update for the installed package I assume it works the same way for pacman ? Correct me if I'm wrong. Thus, I don't think that adding |
||
echo "Not doing that could cause problems between dependencies, or missing files in repositories." | ||
echo "" | ||
echo "Continuing will update your installed packages and install needed ones." | ||
while [[ $CONTINUE != "y" && $CONTINUE != "n" ]]; do | ||
read -p "Continue ? [y/n]: " -e CONTINUE | ||
done | ||
if [[ "$CONTINUE" = "n" ]]; then | ||
echo "Ok, bye !" | ||
exit 4 | ||
fi | ||
pacman -Syu openvpn iptables openssl wget ca-certificates curl --needed --noconfirm | ||
fi | ||
# Find out if the machine uses nogroup or nobody for the permissionless group | ||
if grep -qs "^nogroup:" /etc/group; then | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You confirm that lines 51 to 62 this add a functionnal rc.local, and therefore resolving #1 ?