diff --git a/config.php.default b/config.php.default index 53e4b4569b..e527a97b61 100755 --- a/config.php.default +++ b/config.php.default @@ -39,5 +39,7 @@ $config['auth_mechanism'] = "mysql"; # default, other options: ldap, http-auth #$config['nets'][] = "172.16.0.0/12"; #$config['nets'][] = "192.168.0.0/16"; +# Uncomment the next line to disable daily updates +#$config['update'] = 0; ?> diff --git a/daily.php b/daily.php new file mode 100644 index 0000000000..22ac1e47e1 --- /dev/null +++ b/daily.php @@ -0,0 +1,15 @@ + diff --git a/daily.sh b/daily.sh new file mode 100644 index 0000000000..a02a6846be --- /dev/null +++ b/daily.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ $(php daily.php -f update) -eq 1 ]; then + git pull --no-edit --quiet +fi diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 6fcdc23b15..46a3d4f394 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -542,4 +542,7 @@ $config['modules_compat']['rfc1628']['netmanplus'] = 1; $config['modules_compat']['rfc1628']['deltaups'] = 1; $config['modules_compat']['rfc1628']['poweralert'] = 1; +# Enable daily updates +$config['update'] = 1; + ?> diff --git a/librenms.cron b/librenms.cron index b42b782acf..0738b41e98 100644 --- a/librenms.cron +++ b/librenms.cron @@ -1,3 +1,4 @@ 33 */6 * * * root /opt/librenms/discovery.php -h all >> /dev/null 2>&1 */5 * * * * root /opt/librenms/discovery.php -h new >> /dev/null 2>&1 */5 * * * * root /opt/librenms/poller.php -h all >> /dev/null 2>&1 +15 0 * * * root sh /opt/librenms/daily.sh > /dev/null 2>&1