Created
August 9, 2012 22:12
-
-
Save darK-Zi0n-te4am-cr3vv/3308478 to your computer and use it in GitHub Desktop.
Starting OpenVPN using Ubuntu Upstart
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
description "OpenVPN service instance" | |
author "C.c <[email protected]>" | |
stop on runlevel [016] | |
respawn | |
instance $CONFIG_FILE | |
exec /usr/sbin/openvpn --config $CONFIG_FILE |
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
description "OpenVPN service" | |
author "C.c <[email protected]>" | |
# in my case OpenVPN using MySQL to obtain client IPs | |
start on (runlevel [2345] and started mysql) | |
stop on runlevel [016] | |
task | |
script | |
for conf in `ls /etc/openvpn/*.conf` | |
do | |
start openvpn-instance CONFIG_FILE=$conf | |
done | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment