Project

General

Profile

« Previous | Next » 

Revision fdb7f0a5

Added by Jim Pingle about 6 years ago

status.php updates

  • Ensure firewall info is generated when run from the CLI
  • For SG-1100, also include its public key

(cherry picked from commit 2309b26a2b4643d9b4d0ea9be371004a781acc09)

View differences:

src/usr/local/www/status.php
253 253
		}
254 254
	}
255 255

  
256
	file_put_contents("{$output_path}/Product Info.txt", str_replace("<br/>", "\n", $firewall_info) . "\n");
256
	file_put_contents("{$output_path}/Product-Info.txt", str_replace("<br/>", "\n", $firewall_info) . "\n");
257 257
	return $firewall_info;
258 258
}
259 259

  
......
266 266
/* Set up all of the commands we want to execute. */
267 267

  
268 268
/* OS stats/info */
269
if (function_exists("system_get_thothid")) {
270
	$thothid = system_get_thothid();
271
	if (!empty($thothid)) {
272
		defCmdT("Product-Public Key", "/usr/bin/openssl ec -in /etc/thoth/key.pem -noout -text | /usr/bin/sed -n '/pub:/,\$p'");
273
	}
274
}
275

  
269 276
defCmdT("OS-Uptime", "/usr/bin/uptime");
270 277
defCmdT("Network-Interfaces", "/sbin/ifconfig -vvvvvam");
271 278
defCmdT("Network-Interface Statistics", "/usr/bin/netstat -nWi");
......
415 422

  
416 423
if ($console) {
417 424
	print(gettext("Gathering status data...") . "\n");
425
	get_firewall_info();
418 426
}
419 427
execCmds();
420 428

  

Also available in: Unified diff