From 275d62c468a7c96b7de168a1bcd0e7735a031fce Mon Sep 17 00:00:00 2001 From: dmacias72 Date: Sat, 8 Oct 2016 16:08:30 -0600 Subject: [PATCH] consolidate code --- .../emhttp/plugins/NerdPack/scripts/packagemanager | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager index b3934515..ea410f48 100755 --- a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager +++ b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager @@ -139,15 +139,15 @@ foreach ($pkg_cfg as $pkg_name => $pkg_pref) { // get preferences for each packa }else{ if ($pkg_pref == 'yes'){ if (file_exists($pkg_file)){ - if (file_check_sha1($pkg_file, $pkg_sha1)) + if (file_check_sha1($pkg_file, $pkg_sha1)){ $pkg_msg = 'package up to date, checksum ok.'; - else{ - if (file_exists($pkg_file)) - unlink($pkg_file); + }else{ + unlink($pkg_file); $pkg_msg = 'checksum failed! package deleted.'; } - }else + }else{ $pkg_msg = ' package missing!'; + } logger($pkg_name." $pkg_msg", $argq); }