@@ -34,24 +34,6 @@ public static function fixLocalSubnetRoutes(): void
3434 }
3535 }
3636
37- public static function patchSSH (Config $ config ): void
38- {
39- $ version = parse_ini_file ('/etc/unraid-version ' ) ?: array ();
40-
41- if ($ version ['version ' ] == "6.12.0 " ) {
42- Utils::logmsg ("Unraid 6.12.0: Checking SSH startup script " );
43- $ ssh = file_get_contents ('/etc/rc.d/rc.sshd ' ) ?: "" ;
44-
45- if (str_contains ($ ssh , '$family ' )) {
46- Utils::logmsg ("Unraid 6.12.0: Repairing SSH startup script " );
47- $ ssh = str_replace ('$family ' , 'any ' , $ ssh );
48- file_put_contents ('/etc/rc.d/rc.sshd ' , $ ssh );
49- }
50- } else {
51- Utils::logmsg ("Unraid 6.12.0: SSH startup script not applicable " );
52- }
53- }
54-
5537 public static function checkWebgui (Config $ config , string $ tailscale_ipv4 ): void
5638 {
5739 // Make certain that the WebGUI is listening on the Tailscale interface
@@ -129,31 +111,6 @@ public static function enableIPForwarding(Config $config): void
129111 }
130112 }
131113
132- public static function patchNginx (): void
133- {
134- $ original = 'location ~ \.php$ { ' ;
135- $ replace = <<<'END'
136- location ~ ^(.+\.php)(.*)$ {
137- fastcgi_split_path_info ^(.+\.php)(.*)$;
138- fastcgi_param PATH_INFO $fastcgi_path_info;
139- END;
140-
141- $ nginx = file_get_contents ("/etc/rc.d/rc.nginx " ) ?: "" ;
142-
143- if (strpos ($ nginx , $ original ) !== false ) {
144- // Patch the rc.nginx file
145- Utils::logmsg ("Detected original rc.nginx, applying patch. " );
146-
147- if ( ! file_exists ("/etc/rc.d/rc.nginx.pre-tailscale " )) {
148- copy ("/etc/rc.d/rc.nginx " , "/etc/rc.d/rc.nginx.pre-tailscale " );
149- }
150- $ newFile = str_replace ($ original , $ replace , $ nginx );
151- file_put_contents ("/etc/rc.d/rc.nginx " , $ newFile );
152- }
153-
154- Utils::run_command ("/etc/rc.d/rc.nginx reload 2>&1 " );
155- }
156-
157114 public static function applyGRO (): void
158115 {
159116 /** @var array<int, array<string>> $ip_route */
0 commit comments