shell-scripte-code/openvpn.sh

18 lines
478 B
Bash
Raw Normal View History

2019-01-07 20:23:02 +01:00
#!/usr/bin/env bash
2017-10-01 16:45:01 +02:00
set -ex
#openvpn --config ~/linux.ovpn &
#sleep 10
#ip route add default dev tun0
echo "systemd start-script wird erzeugt!!!"
echo "Bitte OpenVPN config in die /etc/openvpn/client/client.conf kopieren!!!"
if [ -f /lib/systemd/system/openvpn-client@client.service ]; then
2018-11-11 04:24:37 +01:00
echo "link vorhanden!"
2017-10-01 16:45:01 +02:00
else
2018-11-11 04:24:37 +01:00
ln /lib/systemd/system/openvpn-client@.service /lib/systemd/system/openvpn-client@client.service
2017-10-01 16:45:01 +02:00
fi
systemctl enable openvpn-client@client.service