Commit 6c9838a5 authored by Franco Fichtner's avatar Franco Fichtner

firmware: other rename+move went well, finish up

parent 3941c468
......@@ -47,7 +47,7 @@ class FirmwareController extends ApiControllerBase
{
$this->sessionClose(); // long running action, close session
$backend = new Backend();
$response = json_decode(trim($backend->configdRun('firmware pkgstatus')), true);
$response = json_decode(trim($backend->configdRun('firmware check')), true);
if ($response != null) {
if (array_key_exists('connection', $response) && $response['connection'] == 'error') {
......
#!/bin/sh
# Copyright (C) 2015 Franco Fichtner <franco@opnsense.org>
# Copyright (C) 2014 Deciso B.V.
# All rights reserved.
#
......@@ -24,10 +25,6 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# USAGE:
# Add this file to a CRON job to check for package updates regularly
#
# This script generates a json structured file with the following content:
# connection: error|ok
# repository: error|ok
......@@ -39,7 +36,7 @@
# reinstall_packages: array with { name: <package_name>, version: <package_version> }
# upgrade_packages: array with { name: <package_name>, current_version: <current_version>, new_version: <new_version> }
# TODO: Add object with items that will be removed or uninstalled
# TODO: Add object with items that will be removed
# Variables used
connection="error"
......
[pkgstatus]
command:/usr/local/opnsense/scripts/pkg_updatecheck.sh
[check]
command:/usr/local/opnsense/scripts/firmware/check.sh
parameters:
type:script_output
message:retrieve package status
......
......@@ -35,7 +35,7 @@ require_once("system.inc");
require_once("stats.inc");
if (isset($_REQUEST['getupdatestatus'])) {
$pkg_json = trim(configd_run('firmware pkgstatus'));
$pkg_json = trim(configd_run('firmware check'));
if ($pkg_json != '') {
$pkg_status = json_decode($pkg_json, true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment