From cc657fa459f11a3bb5d72ba16d6f3a93fdd9af68 Mon Sep 17 00:00:00 2001 From: TheKinrar Date: Thu, 24 Nov 2016 18:07:23 +0100 Subject: [PATCH] Fixed rc.local and sysctl.conf files on ArchLinux --- openvpn-install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 5481696..4c5980f 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -59,12 +59,18 @@ RemainAfterExit=yes [Install] WantedBy=multi-user.target" > /etc/systemd/system/rc-local.service systemctl enable rc-local.service - touch /etc/rc.local + if ! grep '#!' $RCLOCAL; then + echo "#!/bin/bash" > $RCLOCAL + fi else echo "Looks like you aren't running this installer on a Debian, Ubuntu, CentOS or ArchLinux system" exit 4 fi +if [[ ! -e /etc/sysctl.conf ]]; then + touch /etc/sysctl.conf +fi + newclient () { # Generates the custom client.ovpn cp /etc/openvpn/client-common.txt ~/$1.ovpn