Comment 1 for bug 192560

Revision history for this message
Adam Porter (alphapapa) wrote :

I have modified backupninja to check if a job is not supposed to be run on battery power, and if not, if the system is on battery power. It checks for a "runonbattery" option (which defaults to "yes") in the main section of each backup job's config file in /etc/backup.d, and uses "acpi -a" and grep to check the power status.

I'm not sure of the right way to supply a diff, so I will attach /usr/sbin/backupninja, changed from 0.9.4-6ubuntu4. Then the default config file should be updated, and ninjahelper too, I guess, though that's over my head right now.

Hopefully this can be merged into Ubuntu and Debian. I'd suggest upstream, but it hasn't even released 0.9.5 yet, though it's had several changes since 0.9.4.