Skip to content
This repository was archived by the owner on Jul 15, 2025. It is now read-only.

Commit 0db99bc

Browse files
committed
chore: format
1 parent 7719051 commit 0db99bc

6 files changed

Lines changed: 11 additions & 10 deletions

File tree

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php
22

3-
function applyGRO() {
3+
function applyGRO()
4+
{
45
$ip_route = json_decode(implode(run_command('ip -j route get 8.8.8.8')), true);
56

67
// Check if a device was returned
7-
if(!isset($ip_route[0]['dev'])) {
8+
if ( ! isset($ip_route[0]['dev'])) {
89
logmsg("Default interface could not be detected.");
910
return;
1011
}
@@ -13,11 +14,11 @@ function applyGRO() {
1314

1415
$ethtool = json_decode(implode(run_command("ethtool --json -k {$dev}")), true)[0];
1516

16-
if(isset($ethtool['rx-udp-gro-forwarding']) && !$ethtool['rx-udp-gro-forwarding']['active']) {
17+
if (isset($ethtool['rx-udp-gro-forwarding']) && ! $ethtool['rx-udp-gro-forwarding']['active']) {
1718
run_command("ethtool -K {$dev} rx-udp-gro-forwarding on");
1819
}
1920

20-
if(isset($ethtool['rx-gro-list']) && $ethtool['rx-gro-list']['active']) {
21+
if (isset($ethtool['rx-gro-list']) && $ethtool['rx-gro-list']['active']) {
2122
run_command("ethtool -K {$dev} rx-gro-list off");
2223
}
23-
}
24+
}

src/usr/local/emhttp/plugins/tailscale/include/common/logmsg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ function logmsg($message, $priority = LOG_INFO)
55
$timestamp = date('Y/m/d H:i:s');
66
$filename = basename($_SERVER['PHP_SELF']);
77
file_put_contents("/var/log/tailscale-utils.log", "{$timestamp} {$filename}: {$message}" . PHP_EOL, FILE_APPEND);
8-
}
8+
}

src/usr/local/emhttp/plugins/tailscale/include/common/run_command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ function run_command($command, $alwaysShow = false, $show = true)
1414
}
1515

1616
return $output;
17-
}
17+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
applyGRO();
3+
applyGRO();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
applyGRO();
3+
applyGRO();

src/usr/local/emhttp/plugins/tailscale/pre-startup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
foreach (glob("{$docroot}/plugins/tailscale/include/pre-startup/*.php") as $file) {
1313
logmsg("Executing {$file}");
14-
try {
14+
try {
1515
require_once $file;
1616
} catch (Throwable $e) {
1717
logmsg("Caught exception in {$file} : " . $e->getMessage());

0 commit comments

Comments
 (0)