Created
June 23, 2025 10:35
-
-
Save arrrgi/7a24ba14e24043cce6216cc770bc5280 to your computer and use it in GitHub Desktop.
Systemd unit file for single user rclone mover to a Google Drive remote
This file contains hidden or 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
[Unit] | |
Description=Rclone seedbox to cloud data mover service | |
Documentation=https://rclone.org | |
After=network.target network-online.target | |
[Service] | |
Type=oneshot | |
Environment=PATH=%h/.local/bin:%h/bin:/usr/local/bin:/usr/bin:/bin | |
Environment=RCLONE_CONFIG="%h/.config/rclone/rclone.conf" | |
Environment=RCLONE_LOG_DIR="%h/.log" | |
Environment=RCLONE_MOVE_PATH="%h/mnt/data/Move" | |
Environment=RCLONE_REMOTE_NAME="GDCrypt" | |
Environment=RCLONE_REMOTE_PATH="mvault-bucket" | |
# Check that rclone is installed | |
ExecStartPre=/usr/bin/test -x %h/.local/bin/rclone | |
# Check the mount directory is available and writeable | |
ExecStartPre=/usr/bin/test -d ${RCLONE_MOVE_PATH} | |
ExecStartPre=/usr/bin/test -w ${RCLONE_MOVE_PATH} | |
# Check that rclone configuation file is available and readable | |
ExecStartPre=/usr/bin/test -f ${RCLONE_CONFIG} | |
ExecStartPre=/usr/bin/test -r ${RCLONE_CONFIG} | |
ExecStart=rclone move \ | |
--config ${RCLONE_CONFIG} \ | |
--check-first --delete-empty-src-dirs --no-traverse \ | |
--copy-links --tpslimit 10 --tpslimit-burst 15 \ | |
--checkers 8 --buffer-size 64M --transfers 8 \ | |
--stats-one-line --stats 0 --log-level INFO \ | |
--order-by size,desc \ | |
${RCLONE_MOVE_PATH} ${RCLONE_REMOTE_NAME}:${RCLONE_REMOTE_PATH} | |
ExecStartPost=/usr/bin/curl -fsS --retry 3 https://hc-ping.com/<redacted> | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment