mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 02:25:05 +00:00
scripts: PSR12 style fixes test drive
Mostly spacing around = , + - etc with a dash of conditional formatting madness, but rules are rules.
This commit is contained in:
parent
26a6738036
commit
9f10421ac6
@ -62,7 +62,7 @@ if (isset($configObj->OPNsense->captiveportal->zones)) {
|
||||
$output_pem_filename = "/var/etc/cert-cp-zone" . $zone_id . ".pem";
|
||||
file_put_contents($output_pem_filename, $pem_content);
|
||||
chmod($output_pem_filename, 0600);
|
||||
echo "certificate generated " .$output_pem_filename . "\n";
|
||||
echo "certificate generated " . $output_pem_filename . "\n";
|
||||
// generate ca pem file
|
||||
if (!empty($cert->caref)) {
|
||||
$output_pem_filename = "/var/etc/ca-cp-zone" . $zone_id . ".pem";
|
||||
@ -70,7 +70,7 @@ if (isset($configObj->OPNsense->captiveportal->zones)) {
|
||||
$ca = ca_chain($cert);
|
||||
file_put_contents($output_pem_filename, $ca);
|
||||
chmod($output_pem_filename, 0600);
|
||||
echo "certificate generated " .$output_pem_filename ."\n";
|
||||
echo "certificate generated " . $output_pem_filename . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2018 Deciso B.V.
|
||||
* All rights reserved.
|
||||
|
||||
@ -139,7 +139,7 @@ $count = count($ifdescrs);
|
||||
interface */
|
||||
if ($count > 1) {
|
||||
echo "Available interfaces:\n\n";
|
||||
$x=1;
|
||||
$x = 1;
|
||||
foreach ($ifdescrs as $iface => $ifcfg) {
|
||||
$config_descr = get_interface_config_description($iface);
|
||||
echo "{$x} - {$ifcfg['descr']} ({$config_descr})\n";
|
||||
@ -293,12 +293,17 @@ function console_configure_ip_address($version)
|
||||
|
||||
$upperifname = strtoupper($interface);
|
||||
|
||||
if ($interface != 'wan' && $version === 6 && !empty($config['interfaces']['wan']['ipaddrv6']) &&
|
||||
$config['interfaces']['wan']['ipaddrv6'] == 'dhcp6' && console_prompt_for_yn(sprintf(
|
||||
if (
|
||||
$interface != 'wan'
|
||||
&& $version === 6
|
||||
&& !empty($config['interfaces']['wan']['ipaddrv6'])
|
||||
&& $config['interfaces']['wan']['ipaddrv6'] == 'dhcp6'
|
||||
&& console_prompt_for_yn(sprintf(
|
||||
'Configure %s address %s interface via WAN tracking?',
|
||||
$label_IPvX,
|
||||
$upperifname
|
||||
), 'y')) {
|
||||
), 'y')
|
||||
) {
|
||||
$intip = 'track6';
|
||||
$intbits = '64';
|
||||
$isintdhcp = true;
|
||||
@ -442,7 +447,7 @@ if (!empty($nameserver6)) {
|
||||
if (count($nameservers)) {
|
||||
$config['system']['dnsserver'] = $nameservers;
|
||||
for ($dnscounter = 1; $dnscounter < 9; $dnscounter++) {
|
||||
$dnsgwname= "dns{$dnscounter}gw";
|
||||
$dnsgwname = "dns{$dnscounter}gw";
|
||||
if (isset($config['system'][$dnsgwname])) {
|
||||
unset($config['system'][$dnsgwname]);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user