...or my ignorance?
Stop (/etc/init.d/openvpn stop) isn't working as seen in ps. All other functions seem to work fine. Since more advanced scripting with pid control is used, I'm lost to see how it's supposed to work.
Does anyone see the problem?
/etc/init.d/openvpn
#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
START=70
BIN=openvpn
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
$BIN $OPTIONS
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
AH! I did discover /var/run/openvpn.pid DOES NOT EXIST. But I'm very fuzzy why it should. I know I can hack a killall but trying to understand what I'm missing.
root@OpenWrt:~# ps -A | grep vpn
444 root 308 S grep vpn
root@OpenWrt:~# /etc/init.d/openvpn start
root@OpenWrt:~# ps -A | grep vpn
451 nobody 1420 S openvpn --config /etc/openvpn/server.conf --daemon
root@OpenWrt:~# ls /var/run
dnsmasq.pid dropbear.pid nas.wl0.pid
root@OpenWrt:~#
Kamikaze 7.07
OpenVPN 2.0.9-2 standard package
WRT54G v4
Last, my tap0 is not setup yet (I use bridging) but OpenVPN log shows no errors... can this be the problem?
I'm trying to understand and stay within the /etc/init.d/openvpn script supplied with the OpenVPN 2.0.9 standard package in Kamikaze 7.07 (rather than hacking my own ).
TIA
(Last edited by Bill_MI on 29 Sep 2007, 17:00)