mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
firmware: opnsense-version will do the trick
This commit is contained in:
parent
024bb6a003
commit
b35843fdbc
@ -31,7 +31,7 @@ $metafile = '/usr/local/opnsense/version/core';
|
||||
|
||||
$ret = json_decode(@file_get_contents($metafile), true);
|
||||
if ($ret != null) {
|
||||
$ret['product_crypto'] = explode(' ', trim(shell_exec('/usr/local/bin/openssl version')))[0];
|
||||
$ret['product_crypto'] = trim(shell_exec('opnsense-version -f'));
|
||||
$ret['product_mirror'] = preg_replace('/\/[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}\//i', '/subscription-key/', trim(shell_exec('opnsense-update -M')));
|
||||
$ret['product_time'] = date(DATE_RFC2822, filemtime($metafile));
|
||||
ksort($ret);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user