Skip to content

Instantly share code, notes, and snippets.

@ganapathichidambaram
Created April 17, 2022 11:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganapathichidambaram/e25b6ccffb40cfb7334b70112a35110a to your computer and use it in GitHub Desktop.
Save ganapathichidambaram/e25b6ccffb40cfb7334b70112a35110a to your computer and use it in GitHub Desktop.
Rclone Systemd Service for sync to google Drive
[Unit]
Description=FlexyDial Drive Sync
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=ganapathi
Group=ganapathi
ExecStart=rclone sync --update -v --drive-import-formats docx,xlsx,txt,zip --drive-skip-shortcuts --exclude *Thumbs.db* --exclude *.~* /home/ganapathi/Flexydial Flexydial:
#ExecStartPost=rclone copy -v --drive-import-formats docx,xlsx,pdf Flexydial: /home/ganapathi/Flexydial
[Install]
WantedBy=timers.target
Unit]
Description=FlexyDial Sync Timer
[Timer]
#Execute job if it missed a run due to machine being off
Persistent=true
User=ganapathi
Group=ganapathi
#Run 120 seconds after boot for the first time
#OnBootSec=120
#Run every 1 hour thereafter
OnUnitActiveSec=3800
#File describing job to execute
#Unit=
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment