source:
freewrt/package/openvpn/files/openvpn.init@
93451a15
| Last change on this file since 93451a15 was 93451a15, checked in by , 19 years ago | |
|---|---|
|
|
| File size: 311 bytes | |
| Rev | Line | |
|---|---|---|
| [c1948f0] | 1 | #!/bin/sh |
| 2 | ||
| [93451a15] | 3 | . /etc/rc.conf |
| [c1948f0] | 4 | |
| 5 | case "$1" in | |
| [9c01de7] | 6 | autostart) |
| 7 | test x"$openvpn" = x"NO" && exit 0 | |
| 8 | exec $0 start | |
| 9 | ;; | |
| [c1948f0] | 10 | start) |
| [93451a15] | 11 | [ -f /etc/openvpn/openvpn.conf ] || exit |
| 12 | openvpn --daemon --config openvpn.conf --cd /etc/openvpn | |
| 13 | ;; | |
| 14 | stop) | |
| 15 | killall openvpn | |
| [c1948f0] | 16 | ;; |
| 17 | restart) | |
| 18 | $0 stop | |
| 19 | sleep 3 | |
| 20 | $0 start | |
| 21 | ;; | |
| 22 | esac | |
| [93451a15] | 23 | exit $? |
Note:
See TracBrowser
for help on using the repository browser.
