ArchiveTeam / IA.BAK

We back up a lot of stuff from around the web; now it's time to back up the Internet Archive, just in case.
GNU General Public License v3.0
87 stars 22 forks source link

automatically install a systemd service/cron job #21

Closed db48x closed 9 years ago

db48x commented 9 years ago

This happens during setup; run ./install-fsck-service to do it later.

joeyh commented 9 years ago

What happens if the system has systemd installed, but the user is not logged in, or is perhaps logged in in a way that does not start the user service?

I guess the risk is, someone who logs out every night and back in in the morning may never be logged on at the time that the user systemd runs the timer. The cron job would not have this problem, although it has other problems..

db48x commented 9 years ago

On May 8, 2015 11:32:30 AM PDT, Joey Hess notifications@github.com wrote:

What happens if the system has systemd installed, but the user is not logged in, or is perhaps logged in in a way that does not start the user service?

I guess the risk is, someone who logs out every night and back in in the morning may never be logged on at the time that the user systemd runs the timer. The cron job would not have this problem, although it has other problems..


Reply to this email directly or view it on GitHub: https://github.com/ArchiveTeam/IA.BAK/pull/21#issuecomment-100321555

There's a configuration change the user can make which tells systemd to run their use units even when they are logged out. Setting it requires root though; I guess we could include a message to that effect. I also read that this may become the default at some point.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

db48x commented 9 years ago

I've updated it to add the message. BTW, the timer has Persistent set, so systemd will remember the time it was supposed to run, and if the current time is after that it will go ahead and run the timer. This means that if lingering is off, the job was supposed to run at 2am, and the user logs in at 9am then systemd will go ahead and run the job right away rather than waiting until tomorrow.