mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: daily.sh log_dir failed when install_dir and log_dir were not set
This commit is contained in:
4
daily.sh
4
daily.sh
@@ -20,11 +20,11 @@
|
||||
# CONSTANTS
|
||||
#######################################
|
||||
# define DIR_LIBRENMS as the directory this script is called from
|
||||
DIR_LIBRENMS=$(dirname "$0");
|
||||
DIR_LIBRENMS=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
# set log_file, using librenms $config['log_dir'], if set
|
||||
# otherwise we default to <LibreNMS Install Directory>/logs
|
||||
LOG_DIR=$(php -r "include '${DIR_LIBRENMS}/config.php'; isset(\$config['log_dir']) ? print \$config['log_dir'] : print \$config['install_dir'] . '/logs';");
|
||||
LOG_DIR=$(php -r "include '${DIR_LIBRENMS}/config.php'; echo isset(\$config['log_dir']) ? \$config['log_dir'] : '${DIR_LIBRENMS}/logs';")
|
||||
|
||||
|
||||
#######################################
|
||||
|
Reference in New Issue
Block a user