Skip to content

fix(setup-dav-sync)!: use systemd timers instead of cron for periodic sync#9

Open
HaseHarald wants to merge 3 commits intoUT-ilities:masterfrom
HaseHarald:fix_use-systemd-timers
Open

fix(setup-dav-sync)!: use systemd timers instead of cron for periodic sync#9
HaseHarald wants to merge 3 commits intoUT-ilities:masterfrom
HaseHarald:fix_use-systemd-timers

Conversation

@HaseHarald
Copy link

In Ubuntu Touch Focal (20.04) cron is no longer installed by default. It's much more elegant to use templated systemd user-timers anyway.

There's multiple benefits to this solution:

  • Everything can be done in the users home-directory
  • We don't need to mount the root-filesystem in rw mode any more
  • We don't need sudo privileges any more
  • No risky modification of crontabs using sed
  • No need to set the env-vars for DISPLAY and DBUS_SESSION_BUS_ADDRESS any more

BREAKING CHANGE: This does not remove existing cron-jobs that may remain from previous installations. These must be cleared out manually, otherwise synchronization might start in parallel. The effects of this are unknown but potentially not desirable.

… sync

In Ubuntu-Touch Focal (20.04) cron is no longer installed by default. It's much
more elegant to use templated systemd user-timers anyway.

There's multiple benefits to this solution:
- Everything can be done in the users home-directory
- We don't need to mount the root-filesystem in rw mode any more
- We don't need sudo privileges any more
- No risky modification of crontabs using sed
- No need to set the env-vars for DISPLAY and DBUS_SESSION_BUS_ADDRESS any more

BREAKING CHANGE: This does not remove existing cron-jobs that may remain from
previous installations. These must be cleared out manually, otherwise
synchronization might start in parallel. The effects of this are unknown but
potentially not desirable.
Since we no longer use traditional cron-jobs, the documentation should reflect
that. Also some more information on known bugs and issues with backwards
compatibility of this script should be documented.
This currently only allows one synchronization interval for all configuration
files. The interval of the last configuration file wins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant