Revision 4f8e387d
Added by Scott Ullrich over 19 years ago
etc/inc/openvpn.inc | ||
---|---|---|
104 | 104 |
/* next server */ |
105 | 105 |
continue; |
106 | 106 |
} |
107 |
/* restart openvpn daemon if pf is restarted, but not on boot, hence the else if */ |
|
108 |
else if ( $reconfigure == "pfreload") { |
|
109 |
ovpn_server_kill($tun); |
|
110 |
mwexec("/usr/local/sbin/openvpn {$g['varetc_path']}/ovpn_srv_{$tun}.conf"); |
|
111 |
continue; |
|
112 |
} |
|
107 | 113 |
|
108 | 114 |
/* send SIGUSR1 to running openvpn daemon */ |
109 | 115 |
if ( $reconfigure == "true" && isset($server['dynip'])) { |
... | ... | |
181 | 187 |
global $config, $g; |
182 | 188 |
$server = $config['ovpn']['server']['tunnel'][$id]; |
183 | 189 |
|
190 |
/* mount filesystem for read/write */ |
|
191 |
conf_mount_rw(); |
|
192 |
|
|
184 | 193 |
/* get tunnel interface */ |
185 | 194 |
$tun = $server['tun_iface']; |
186 | 195 |
|
... | ... | |
434 | 443 |
fwrite($fd, $ovpn_config); |
435 | 444 |
fclose($fd); |
436 | 445 |
|
446 |
/* return from filesystem read/write mode and mount read-only */ |
|
447 |
conf_mount_ro(); |
|
448 |
|
|
437 | 449 |
//trigger_error("OVPN: $ovpn_config", E_USER_NOTICE); |
438 | 450 |
} |
439 | 451 |
|
... | ... | |
768 | 780 |
|
769 | 781 |
function ovpn_config_client() { |
770 | 782 |
/* Boot time configuration */ |
771 |
global $config, $g, $d_ovpnclidirty_path;;
|
|
783 |
global $config, $g, $d_ovpnclidirty_path; |
|
772 | 784 |
|
773 | 785 |
foreach ($config['ovpn']['client']['tunnel'] as $id => $client) { |
774 | 786 |
|
... | ... | |
1484 | 1496 |
unlink($lockfile); |
1485 | 1497 |
} |
1486 | 1498 |
|
1487 |
?> |
|
1499 |
?> |
Also available in: Unified diff
OpenVPN cleanups by mposch@gmail.com