Last active
February 17, 2022 15:24
-
-
Save ameeno/427e38825868abb6336251fb17ead7d1 to your computer and use it in GitHub Desktop.
rclone systemd service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/rclone.service | |
[Unit] | |
Description=Google Drive (rclone) | |
AssertPathIsDirectory=/home/arun/google_drive/ | |
After=k3s-node.service | |
[Service] | |
Type=simple | |
User=arun | |
Group=arun | |
ExecStart=/usr/bin/rclone mount --config=/home/arun/.config/rclone/rclone.conf remote: /home/arun/google_drive/ | |
ExecStop=/bin/fusermount -u /home/arun/google_drive/ | |
Restart=always | |
RestartSec=10 | |
[Install] | |
WantedBy=multi-user.target | |
#### ALTERNATIVE | |
[Unit] | |
Description=Google Drive (rclone) | |
AssertPathIsDirectory=/home/arun/google_drive | |
After=k3s-node.service | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/rclone mount --config=/home/arun/.config/rclone/rclone.conf | |
--cache-tmp-upload-path=/tmp/rclone/upload | |
--cache-chunk-path=/tmp/rclone/chunks | |
--cache-workers=8 | |
--cache-writes | |
--cache-dir=/tmp/rclone/vfs | |
--cache-db-path=/tmp/rclone/db | |
--no-modtime | |
--drive-use-trash | |
--stats=0 | |
--checkers=16 | |
--bwlimit=40M | |
--dir-cache-time=60m | |
--cache-info-age=60m remote:/ /home/arun/google_drive | |
ExecStop=/bin/fusermount -u /home/arun/google_drive | |
Restart=always | |
RestartSec=10 | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment