source: freewrt/package/openvpn/files/openvpn.init

freewrt_2_0
Last change on this file was 48cd562, checked in by Dirk Nehring <dnehring@…>, 19 years ago

Markus don't like my style, so I give up ;-)

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@1020 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100755
File size: 364 bytes
Line 
1#!/bin/sh
2
3. /etc/rc.conf
4
5case "$1" in
6autostart)
7 test x"${openvpn:-NO}" = x"NO" && exit 0
8 exec $0 start
9 ;;
10start)
11 for c in $(ls /etc/openvpn/*.conf 2>&-); do
12 openvpn --cd /etc/openvpn --config "$c" --daemon
13 done
14 ;;
15stop)
16 killall openvpn
17 ;;
18restart)
19 $0 stop
20 sleep 3
21 $0 start
22 ;;
23*)
24 echo "Usage: $0 {start | stop | restart}"
25 exit 1
26 ;;
27esac
28exit $?
Note: See TracBrowser for help on using the repository browser.