]> ##&name; ###2022.09.27f - fixing permissions for /var/run/nut. ###2022.09.27e - updated folder structure during install (/etc/nut and /etc/ups). ###2022.09.27d - updated location of upsmon.pid in NUTsettings.page, nut_config.php, nut_footer.php, and nut_status.php. ###2022.09.27c - fixing code to update symlink. ###2022.09.27b - updating symlinks for nut 2.8.0. ###2022.09.27a - update nut package to nut-2.8.0-x86_64-1gds. ###2022.09.27 - update net-snmp package to net-snmp-5.9.3-x86_64-1_slack15.0.txz ###2022.03.20 - fix for filetree top level - update nut footer ###2021.01.08 - fix plugin package permissions - cybrnook -update help text to reflect minutes ###2020.05.16 - gfjardim - Show dashboard even if footer is disabled ###2020.05.11 - update nut package for 6.8 ###2020.03.17 - gfjardim - added footer and dashboard plus many other tweaks ###2019.02.03 - update all icons to fa icons - fix editor font in black theme ###2019.01.24 - update settings icon to fa font ###2018.11.25 - add autov to css and js - build nut package from usblib-1.0 branch - remove support link from readme ###2018.05.09 - fix Autodetect - fix null port error ###2018.04.29 - fix rc script interfering with cupsd - fix Run time in red only when on battery thanks @realies - compile nut-2.7.4.20180429 libusb 1.0+0.1 branch for 6.5 added patch for wait and retry ###2018.01.16 - tweak notification event and subject ###2018.01.14 - fix nut power showing 0 ###2018.01.09 - update nut package to 2.7.4 2017.11.29 commit fd7189d - revert Eaton use-case since it is included in nut package - add ups va and watt capacity inputs for ups that do not present real power nominal ###2018.01.06 - add Eaton use-case to improve load accuracy thanks @realies ###2018.01.03 - fix load for ups with ups.power.nominal vs ups.realpower.nominal ###2017.11.29 - fix permissions so nut conf are not world readable - fix nut-scanner options, only scan usb for auto config ###2017.11.26 - fix plugin install service starting when disabled ###2017.11.25 - fix snmp port input box length and add ip mask ###2017.11.03 - update killpower flag - update permissions and security for nut configs - change username and password variables - add slave user and password ###2017.10.28 - downgrade nut package to 2.7.4 due to usb resets in 6.4rc10b ###2017.10.10 - fix ipaddr filter - update input masks for ipaddr, name and username ###2017.10.08a - fix move old pids to new location - compile nut package to latest commit 2017.09.21 - fix: new nut package uses /etc/nut and /var/run/nut ###2017.10.05 - fix add username and password to upsd users - add autorefresh to editor to fix line number placement - move cdnjs to local - update support for new themes ###2017.09.17 - add ability to change UPS Monitor Name, User and Password - update icons ###2017.06.17a - add support for 6.4 themes ###2017.06.04 - add net-snmp package ###2017.05.27 - add autodetection for UPS - fix ip mask ###2017.05.26 - add master/slave options - fix runtime display format ###2017.05.24 - add dropdown options for battery and timers - add killpower flag condition to shutdown script ###2017.05.22 - fix shutdown scripts - move default nut conf files ###2017.05.20 - fix manual config settings ###2017.05.19 - fix reload button - add start conditions to rc script ###2017.05.17 - add manual mode, reload and config editor to settings page - reformat settings page, hide unused vars - add vars, rewrite, combine and move scripts - add snmp settings from Ambrotos fork - untested - add UPS summary, UPS details page and dashboard page - add dynamix plugin api - remove depreciated code - restructure and repackage plugin - rename nut plugin package to difer from nut package ###2015.09.19### - UPS statistics now auto updates(every two seconds) ###2015.08.24### - added launch from plugins(saarg) ###2015.08.23### - added blazer_ser to drivers ###2015.08.23### - Public Release - Fix, Restart on upgrades ###2015.08.22### - Uninstall fixes - Fix autorestart after upgrade - Make USB drivers selectable - Add shutdown on battery levels - Remove user/password and hardcode them (see plugin help) - Moved scripts to plugin folder for 6.1 (ln -s rc.nut) ###2015.08.21### - Initial Release - Test Version (plg) &pkgURL;/nut-2.8.0-x86_64-1gds.txz 2c7a37ac49a3c752536b7f4f43777cc2 &pkgURL;/nut-2.7.4.20181125-x86_64-1.txz a46d656085991e02a605786007412d76 &pkgURL;/nut-2.7.4.20171129-x86_64-1.txz 24702ef930855db3432ed9ee73e93d42 &pkgURL;/net-snmp-5.9.3-x86_64-1_slack15.0.txz 5beebc819894c94bedbc531d47cfe497 &gitURL;/archive/&plgNAME;.txz &gitURL;/archive/&plgNAME;.md5 #!/bin/bash CONFIG=&plgPATH;/&name;.cfg # read our configuration if [ -e "$CONFIG" ]; then source "$CONFIG" fi if [ "$SERVICE" == "enable" ]; then /etc/rc.d/rc.nut start fi #Verify Unraid Version source /etc/unraid-version if [[ ${version:0:3} == 6.0 ]]; then echo "Unraid version 6.1 or higher is required" exit 1 fi # Verify and install plugin package sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz) sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5) if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then echo "Wrong 'plugin' package md5 hash." rm &plgPATH;/&plgNAME;.txz rm &plgPATH;/&plgNAME;.md5 exit 1 else # upgrade plugin package upgradepkg --install-new &plgPATH;/&plgNAME;.txz # Stop service echo "stopping services..." /etc/rc.d/rc.nut stop 2>/dev/null # start network ups tools echo "checking network ups tools configuration..." at -M -f /tmp/start_&name; now 2>/dev/null sleep 1 rm -f /tmp/start_&name; # Cleaning old plugin source files find &plgPATH;/ -type f -iname "&name;-plugin*.txz" ! -iname "*&version;*" -delete find &plgPATH;/ -type f -iname "&name;-plugin*.md5" ! -iname "*&version;*" -delete echo "" echo "-----------------------------------------------------------" echo " &name; has been installed." echo " Copyright 2015, macester" echo " Copyright 2020, gfjardim" echo " Copyright 2015-2022, &author;" echo " Version: &version;" echo "-----------------------------------------------------------" echo "" fi # Stop service /etc/rc.d/rc.nut stop 2>/dev/null # check if net-snmp is used by another plugin if [ `find /boot/config/plugins/*.plg -type f ! -iname "*&name;.plg*" | xargs grep "net-snmp" -sl` ]; then echo "net-snmp inuse by another plugin" rm -f &plgPATH;/net-snmp*.txz fi removepkg &plgPATH;/*.txz rm -rf &emhttp; rm -f &plgPATH;/*.txz \ &plgPATH;/*.md5 echo "" echo "-----------------------------------------------------------" echo " &name; has been removed." echo " Copyright 2015, macester" echo " Copyright 2020, gfjardim" echo " Copyright 2017-2022, &author;" echo " Version: &version;" echo "-----------------------------------------------------------" echo ""