mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-23 21:46:08 +03:00
parent
43ef4f920d
commit
1c79a9603b
@ -145,6 +145,7 @@ if [[ -e /etc/openvpn/server/server.conf ]]; then
|
|||||||
fi
|
fi
|
||||||
systemctl disable --now openvpn-server@server.service
|
systemctl disable --now openvpn-server@server.service
|
||||||
rm -rf /etc/openvpn/server
|
rm -rf /etc/openvpn/server
|
||||||
|
rm -f /etc/systemd/system/openvpn-server@server.service.d/disable-limitnproc.conf
|
||||||
rm -f /etc/sysctl.d/30-openvpn-forward.conf
|
rm -f /etc/sysctl.d/30-openvpn-forward.conf
|
||||||
if [[ "$OS" = 'debian' ]]; then
|
if [[ "$OS" = 'debian' ]]; then
|
||||||
apt-get remove --purge -y openvpn
|
apt-get remove --purge -y openvpn
|
||||||
@ -212,6 +213,12 @@ else
|
|||||||
echo
|
echo
|
||||||
echo "Okay, that was all I needed. We are ready to set up your OpenVPN server now."
|
echo "Okay, that was all I needed. We are ready to set up your OpenVPN server now."
|
||||||
read -n1 -r -p "Press any key to continue..."
|
read -n1 -r -p "Press any key to continue..."
|
||||||
|
# If running inside a container, disable LimitNPROC to prevent conflicts
|
||||||
|
if systemd-detect-virt -cq; then
|
||||||
|
mkdir /etc/systemd/system/openvpn-server@server.service.d/ 2>/dev/null
|
||||||
|
echo '[Service]
|
||||||
|
LimitNPROC=infinity' > /etc/systemd/system/openvpn-server@server.service.d/disable-limitnproc.conf
|
||||||
|
fi
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user