make sure openvpn-server is not running
/etc/init.d/openvpn stop
/etc/init.d/openvpn disable
create openvpn directory
copy config and key to openvpn directory
cp xyz.conf /etc/openvpn
cp xyz.key /etc/openvpn
change path in config so that secret points to /etc/openvpn/xyz.key
create openvpn-client startup-script as /etc/init.d/openvpn-client
(the following is not very elegant but it works)
#!/bin/sh /etc/rc.common
START=90
start () {
logger -t "openvpn" "starting openvpn-client"
/usr/sbin/openvpn --daemon --config /etc/openvpn/xyz.conf
}
stop () {
logger -t "openvpn" "stopping openvpn-client"
killall openvpn
sleep 3
}
make startup-script executable
chmod 0755 /etc/init.d/openvpn-client
start and permanently enable openvpn-client
/etc/init.d/openvpn-client enable
/etc/init.d/openvpn-client start
hope this helps
EDIT: changed path-typo in startup-script (openvpn is in /usr/sbin)
(Last edited by lgvienna on 3 Dec 2008, 11:06)