Has anyone run into this / have a solution? Thx
EDIT:
Now I'm no big city admin but I think that the following logic is flawed:
(from routerconfigs/functions.php)
Code: Select all
$t = time();
// Get device that have not backed up in 24 hours + 30 minutes and that haven't been tried in the last 30 minutes
$devices = db_fetch_assoc("SELECT * FROM plugin_routerconfigs_devices WHERE enabled = 'on' AND ($t - (schedule * 86400)) - 3600 > lastbackup AND $t - lastattempt > 1800", false);
1268851113 - 86400 - 3600 = 12688421113 > 0 and 1268851113 - 0 > 1800,false based on the data I pulled from said table for the new device:
Code: Select all
+----+---------+-----------+-----------+-----------+---------+------------+----------+----------+-----------+------------+-------------+------------+-------+
| id | enabled | ipaddress | hostname | directory | account | lastchange | username | schedule | lasterror | lastbackup | lastattempt | devicetype | debug |
+----+---------+-----------+-----------+-----------+---------+------------+----------+----------+-----------+------------+-------------+------------+-------+
| 7 | on | 1.1.1.1 | name | | 1 | 0 | | 1 | | 0 | 0 | 0 | |
+----+---------+-----------+-----------+-----------+---------+------------+----------+----------+-----------+------------+-------------+------------+-------+
Code: Select all
mysql> select * from plugin_routerconfigs_devices where enabled ='on' and 12688421113 > 0 and 1268851113 - 0 > 1800;
| 4 | on | 1.1.1.2 | name | | 1 | 1262725443 | admin | 1 |
| 3 | on | 1.1.1.3 | name | | 1 | 1175569443 | -- Reboot -- | 1 | | 1268766604 | 1268766598 |
| 5 | on | 1.1.1.4 | name | | 1 | 1262016959 | -- Reboot -- | 1 | | 1268850360 | 1268850353 |
| 7 | on | 1.1.1.1 | name | | 1 | 0 | | 1 | | 0 | 0 |
?