Revision c47f209b
Added by Renato Botelho almost 8 years ago
src/etc/inc/upgrade_config.inc | ||
---|---|---|
5364 | 5364 |
function upgrade_168_to_169() { |
5365 | 5365 |
global $config; |
5366 | 5366 |
|
5367 |
$command = '/usr/bin/nice -n20 /etc/rc.update_pkg_metadata'; |
|
5368 |
if (is_array($config['cron']['item'])) { |
|
5369 |
foreach ($config['cron']['item'] as $entry) { |
|
5370 |
if ($entry['command'] == $command) { |
|
5371 |
return; |
|
5372 |
} |
|
5373 |
} |
|
5374 |
} |
|
5375 |
|
|
5367 | 5376 |
$config['cron']['item'][] = array( |
5368 | 5377 |
'minute' => '1', |
5369 | 5378 |
'hour' => '0', |
... | ... | |
5371 | 5380 |
'month' => '*', |
5372 | 5381 |
'wday' => '*', |
5373 | 5382 |
'who' => 'root', |
5374 |
'command' => '/usr/bin/nice -n20 /etc/rc.update_pkg_metadata'
|
|
5383 |
'command' => $command
|
|
5375 | 5384 |
); |
5376 | 5385 |
} |
5377 | 5386 |
|
Also available in: Unified diff
Add a protection to prevent ending up with duplicate crontab entry