mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add framework for new cron features; add ability to update librenms daily
This commit is contained in:
@@ -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;
|
||||
|
||||
?>
|
||||
|
15
daily.php
Normal file
15
daily.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Daily Task Checks
|
||||
* (c) 2013 LibreNMS Contributors
|
||||
*/
|
||||
|
||||
include('includes/defaults.inc.php');
|
||||
include('config.php');
|
||||
|
||||
$options = getopt("f:");
|
||||
|
||||
if ( $options['f'] === 'update') { echo $config['update']; }
|
||||
|
||||
?>
|
5
daily.sh
Normal file
5
daily.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $(php daily.php -f update) -eq 1 ]; then
|
||||
git pull --no-edit --quiet
|
||||
fi
|
@@ -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;
|
||||
|
||||
?>
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user