OpenWrt Forum Archive

Topic: hello @all i have some serious problems with openvpn and start on boot

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi there,

as you can see in the header i have some serious problems configuring openvpn starting at boottime.
i've read several howto's and i am sitting here for hours with no result.
everything works fine except the startup of openvpn. i really don't want to start it manually everytime.
hopefully sombody have a solution.
please

i don't have ideas anymore

sincerely

vincent

Hello,
I don't know which init.d script you are using but you might want to try :

/etc/init.d/openvpn enable

This should add a run level link in your /etc/rc.d/ directory:

/etc/rc.d/S70openvpn -> /etc/init.d/openvpn

If it doesn't work, you can try to add it manually

ln -s /etc/init.d/openvpn /etc/rc.d/S55openvpn

I don't know if this is required but you can also add the stop script link:

ln -s /etc/init.d/openvpn /etc/rc.d/K30openvpn

Tex

this is my startup script

########################################
#!/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 --writepid $RUN_D/$BIN.pid --daemon $OPTIONS
}

stop() {
        [ -f $PID_F ] && kill $(cat $PID_F)
}
########################################

and this worked for me


/etc/init.d/openvpn enable



thank you very much.....

The discussion might have continued from here.