[packages] openvpn: load config only once in the init script up() and down() sections
git-svn-id: svn://svn.openwrt.org/openwrt/packages@17237 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
731e396d00
commit
9f429bdf59
@ -148,8 +148,8 @@ restart() {
|
|||||||
up() {
|
up() {
|
||||||
local exists
|
local exists
|
||||||
local INSTANCE
|
local INSTANCE
|
||||||
|
config_load openvpn
|
||||||
for INSTANCE in "$@"; do
|
for INSTANCE in "$@"; do
|
||||||
config_load openvpn
|
|
||||||
config_get exists "$INSTANCE" TYPE
|
config_get exists "$INSTANCE" TYPE
|
||||||
if [ "$exists" == "openvpn" ]; then
|
if [ "$exists" == "openvpn" ]; then
|
||||||
start_service "$INSTANCE"
|
start_service "$INSTANCE"
|
||||||
@ -160,8 +160,8 @@ up() {
|
|||||||
down() {
|
down() {
|
||||||
local exists
|
local exists
|
||||||
local INSTANCE
|
local INSTANCE
|
||||||
|
config_load openvpn
|
||||||
for INSTANCE in "$@"; do
|
for INSTANCE in "$@"; do
|
||||||
config_load openvpn
|
|
||||||
config_get exists "$INSTANCE" TYPE
|
config_get exists "$INSTANCE" TYPE
|
||||||
if [ "$exists" == "openvpn" ]; then
|
if [ "$exists" == "openvpn" ]; then
|
||||||
stop_service "$INSTANCE"
|
stop_service "$INSTANCE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user