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