Skip to content

Instantly share code, notes, and snippets.

@vijinho
Created September 20, 2020 22:19
Show Gist options
  • Save vijinho/cd01a05bd1e751120b63dec8e94cf0f7 to your computer and use it in GitHub Desktop.
Save vijinho/cd01a05bd1e751120b63dec8e94cf0f7 to your computer and use it in GitHub Desktop.
Example rclone dlna startup service script on ubuntu/popos. place in "/etc/systemd/system/rclonedlna.service" then "systemctl daemon-reload" then "systemctl enable rclonedlna.service" and it should be up on next reboot.
[Unit]
Description=rclone dlna service
Documentation=man:rclone(1)
After=network.target auditd.service
[Service]
ExecStart=rclone serve dlna --addr :8080 \
--vfs-cache-mode full \
--vfs-cache-max-age 60m \
--vfs-cache-max-size 32768 \
--vfs-cache-poll-interval 30m \
--vfs-read-chunk-size 16M \
--vfs-read-chunk-size-limit 2048M \
--transfers 16 \
--multi-thread-streams 16 \
--multi-thread-cutoff 4096M \
--cache-dir=/var/cache/rcloned \
-vv /mnt/data
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify
RuntimeDirectory=rclonedlna
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target
Alias=rclonedlna.service
@mittal07abhilash
Copy link

For some reason the service always fails with "Job for rclonedlna.service failed because a timeout was exceeded".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment