-
Notifications
You must be signed in to change notification settings - Fork 347
Managing the onedrive service
onedrive comes with a user-level systemd service to sync your files automatically.
systemctl --user start onedrive
systemctl --user stop onedrive
systemctl --user enable onedrive
Enabling the onedrive service will tell systemd to start it automatically at boot.
Note that by default systemd
will only keep user services running when a user has at least one active session open. To allow the service to run when you're not logged in, use:
# loginctl enable-linger YOURUSERNAME
To see the logs run:
journalctl --user-unit=onedrive -f
Note that unprivileged users can only view their user-specific log if the Storage
directive of the [Journal]
section of /etc/systemd/journald.conf
is set to persistent
(instead of auto
or volatile
). (More information: https://lists.freedesktop.org/archives/systemd-devel/2016-October/037554.html )
journalctl --user-unit onedrive -f > onedrive-log.txt &
journaltcl can also filter messages with a variety of time formats with --since and --until options, which restrict the entries displayed to those after or before the given time, respectively. For absolute time values use the following format:
YYYY-MM-DD HH:MM:SS
If you want to check what happened at 3:00 PM until an 2 hour ago, you could type:
journalctl --user-unit onedrive --since 15:00 --until "2 hour ago"