Initial commit
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
IP_OF_CIFS_SERVER=10.3.5.2
|
||||
|
||||
# Zuerst starten wir die Bridge mit TAP-Device
|
||||
/opt/openvpn/scripts/bridge-start.sh
|
||||
|
||||
# Wir warten, bis ein ping erfolgreich ist...
|
||||
((count = 20)) # Maximum number to try.
|
||||
while [[ $count -ne 0 ]] ; do
|
||||
ping -q -c 1 -W 1 $IP_OF_CIFS_SERVER >/dev/null # Try once.
|
||||
rc=$?
|
||||
if [[ $rc -eq 0 ]] ; then
|
||||
((count = 1)) # If okay, flag to exit loop.
|
||||
fi
|
||||
((count = count - 1)) # So we don't go forever.
|
||||
done
|
||||
|
||||
# Dann mounten wir den CIFS-Share
|
||||
# (wird fuer Status-File gebraucht)
|
||||
#/bin/mount /opt/openvpn/status
|
||||
/bin/systemctl start opt-openvpn-status.mount
|
||||
#
|
||||
# Dann starten wir Openvpn
|
||||
/sbin/openvpn /opt/openvpn/config/server.conf
|
||||
Reference in New Issue
Block a user