mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: support for Bash version 3 in daily.sh (#4347)
This commit is contained in:
7
daily.sh
7
daily.sh
@@ -55,7 +55,12 @@ if [ -z "$arg" ]; then
|
||||
fi
|
||||
|
||||
cnf=$(echo $(grep '\[.distributed_poller.\]' config.php | egrep -v -e '^//' -e '^#' | cut -d = -f 2 | sed 's/;//g'))
|
||||
cnf=${cnf,,}
|
||||
if ((${BASH_VERSINFO[0]} < 4)); then
|
||||
cnf=`echo $cnf|tr [:upper:] [:lower:]`
|
||||
else
|
||||
cnf=${cnf,,}
|
||||
fi
|
||||
|
||||
if [ -z "$cnf" ] || [ "$cnf" == "0" ] || [ "$cnf" == "false" ]; then
|
||||
# Call ourself again in case above pull changed or added something to daily.sh
|
||||
$0 post-pull
|
||||
|
Reference in New Issue
Block a user