Replace placeholder vpn.ldn-fai.net by vpn.example.org
This commit is contained in:
@@ -64,6 +64,10 @@ function ipv6_compressed($ip) {
|
||||
return $output[0];
|
||||
}
|
||||
|
||||
function noneValue($str) {
|
||||
return ($str == 'none') ? '' : $str;
|
||||
}
|
||||
|
||||
function readAutoConf($file) {
|
||||
$json = file_get_contents($file);
|
||||
$config = json_decode($json, true);
|
||||
@@ -88,12 +92,11 @@ function readAutoConf($file) {
|
||||
}
|
||||
|
||||
dispatch('/', function() {
|
||||
$ip6_net = ynh_setting_get('ip6_net');
|
||||
$ip6_net = ($ip6_net == 'none') ? '' : $ip6_net;
|
||||
$ip6_net = noneValue(ynh_setting_get('ip6_net'));
|
||||
$raw_openvpn = file_get_contents('/etc/openvpn/client.conf.tpl');
|
||||
|
||||
set('service_enabled', ynh_setting_get('service_enabled'));
|
||||
set('server_name', ynh_setting_get('server_name'));
|
||||
set('server_name', noneValue(ynh_setting_get('server_name')));
|
||||
set('server_port', ynh_setting_get('server_port'));
|
||||
set('server_proto', ynh_setting_get('server_proto'));
|
||||
set('login_user', ynh_setting_get('login_user'));
|
||||
|
@@ -71,7 +71,7 @@
|
||||
<div class="form-group">
|
||||
<label for="server_name" class="col-sm-3 control-label"><?= _('Server Address') ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="server_name" id="server_name" placeholder="access.ldn-fai.net" value="<?= $server_name ?>" />
|
||||
<input type="text" class="form-control" name="server_name" id="server_name" placeholder="vpn.example.net" value="<?= $server_name ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user