Skip to content

Instantly share code, notes, and snippets.

@csereno
Created November 3, 2019 22:18
Show Gist options
  • Save csereno/8c01e4014f127076396355c1be5b7d70 to your computer and use it in GitHub Desktop.
Save csereno/8c01e4014f127076396355c1be5b7d70 to your computer and use it in GitHub Desktop.
SystemCtl Service file using RClone to S3 for Unifi Video
# /etc/systemd/system/rclone-unifi.service
[Unit]
Description=Unifi S3 Sync (rclone)
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
User=unifi-video
Group=unifi-video
ExecStart=/usr/bin/rclone mount unifi-cams:unifi-cams /media/UnifiCams \
--config=/usr/lib/unifi-video/.config/rclone/rclone.conf \
--dir-cache-time=160h \
--fuse-flag sync_read \
--tpslimit 10 \
--tpslimit-burst 10 \
--buffer-size=64M \
--attr-timeout=1s \
--vfs-read-chunk-size=2M \
--vfs-read-chunk-size-limit=2G \
--vfs-cache-max-age=5m \
--vfs-cache-mode=writes \
--allow-non-empty
ExecStop=/bin/fusermount -u /usr/lib/unifi-video/
Restart=on-failure
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment