openvpn: Added option to not start the native OpenVPN configurations on boot
OpenVPN configurations that have a uci entry, the enable/enabled option can be used to control whether the OpenVPN connection should be started at system startup or not. OpenVPN configurations that are located under '/etc/openvpn/' are always started at system boot. To ensure that these connections can also be started later, they must 'not' be started automatically during system boot. This can be prevented with the following entry in the OpenVPN configuration. config globals 'globals' option autostart '0' These OpenVPN configurations can then be started later with the command. '/etc/init.d/openvpn start <name>' Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
9a27865acb
commit
053e588162
1 changed files with 6 additions and 1 deletions
|
@ -271,7 +271,12 @@ start_service() {
|
|||
else
|
||||
config_foreach start_uci_instance 'openvpn'
|
||||
|
||||
start_path_instances
|
||||
auto="$(uci_get openvpn globals autostart 1)"
|
||||
if [ "$auto" = "1" ]; then
|
||||
start_path_instances
|
||||
else
|
||||
logger -t openvpn "Autostart for configs in '$PATH_INSTANCE_DIR/*.conf' disabled"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue