forked from dperson/openvpn-client
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6cc8092
commit 20332f7
Showing
3 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
## put whatever is necessary to acquire / build .ovpn files into /vpn here | ||
|
||
echo $0 | ||
|
||
[[ -L vpn.conf ]] && rm vpn.conf | ||
|
||
if [[ ! -e vpn.conf ]]; then | ||
selected=$(find . -name '*.ovpn' | shuf | head -1) | ||
if [[ ! -r $selected ]]; then | ||
echo "Unable to read configuration file ($selected)" | ||
exit 1 | ||
fi | ||
echo "Selected $selected as configuration file" | ||
ln -s $selected vpn.conf | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
echo $0 | ||
|
||
cd /vpn | ||
if [[ -x ./configure.sh ]]; then | ||
./configure.sh || exit 1 | ||
fi | ||
exec /usr/bin/openvpn.sh |