From ccb244aa09de36e4e4dd85120702580144e86383 Mon Sep 17 00:00:00 2001 From: sparknsh <38894705+sparknsh@users.noreply.github.com> Date: Wed, 17 Oct 2018 12:28:39 -0400 Subject: [PATCH] osupdate script clean up (#199) - Change script name for simplify of configuration management orchestration scripts. - Update code syntax. --- snmp/{os-updates.sh => osupdate} | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename snmp/{os-updates.sh => osupdate} (85%) diff --git a/snmp/os-updates.sh b/snmp/osupdate similarity index 85% rename from snmp/os-updates.sh rename to snmp/osupdate index 33e1f9c..e4185d4 100755 --- a/snmp/os-updates.sh +++ b/snmp/osupdate @@ -1,28 +1,28 @@ #!/usr/bin/env bash ################################################################ # copy this script to /etc/snmp/ and make it executable: # -# chmod +x /etc/snmp/os-updates.sh # +# chmod +x /etc/snmp/osupdate # # ------------------------------------------------------------ # # edit your snmpd.conf and include: # -# extend osupdate /opt/os-updates.sh # +# extend osupdate /etc/snmp/osupdate # #--------------------------------------------------------------# # restart snmpd and activate the app for desired host # #--------------------------------------------------------------# # please make sure you have the path/binaries below # -################################################################ -BIN_WC='/usr/bin/wc' -BIN_GREP='/bin/grep' +################################################################ +BIN_WC='/usr/bin/env wc' +BIN_GREP='/usr/bin/env grep' CMD_GREP='-c' CMD_WC='-l' -BIN_ZYPPER='/usr/bin/zypper' +BIN_ZYPPER='/usr/bin/env zypper' CMD_ZYPPER='-q lu' -BIN_YUM='/usr/bin/yum' +BIN_YUM='/usr/bin/env yum' CMD_YUM='-q check-update' -BIN_DNF='/usr/bin/dnf' +BIN_DNF='/usr/bin/env dnf' CMD_DNF='-q check-update' -BIN_APT='/usr/bin/apt-get' +BIN_APT='/usr/bin/env apt-get' CMD_APT='-qq -s upgrade' -BIN_PACMAN='/usr/bin/pacman' +BIN_PACMAN='/usr/bin/env pacman' CMD_PACMAN='-Sup' ################################################################