39 lines
1.0 KiB
Desktop File
39 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=Rclone SMB Mount Service: %i
|
|
Documentation=https://rclone.org
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
User=root
|
|
EnvironmentFile=/etc/rclone/%i.conf
|
|
TimeoutStartSec=1200
|
|
ExecStartPre=/bin/mkdir -p $RCLONE_TARGET_DIR
|
|
ExecStart=/usr/bin/rclone mount %i: $RCLONE_TARGET_DIR \
|
|
--config=/etc/rclone.conf \
|
|
--dir-cache-time 48h \
|
|
--attr-timeout 1s \
|
|
--poll-interval 15s \
|
|
--allow-other \
|
|
--umask 000 \
|
|
--drive-skip-gdocs \
|
|
--drive-acknowledge-abuse \
|
|
--vfs-cache-mode full \
|
|
--vfs-cache-max-age 24h \
|
|
--vfs-cache-max-size ${CACHE_MAX_SIZE} \
|
|
--buffer-size 64M \
|
|
--vfs-read-chunk-size-limit 2048M \
|
|
--vfs-read-chunk-size 128M \
|
|
--cache-dir ${CACHE_DIR} \
|
|
--rc ${RC_ADDR_FLAG} \
|
|
--rc-no-auth
|
|
ExecStartPost=/usr/bin/sleep 5
|
|
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true _async=true $RC_URL_FLAG --rc-no-auth
|
|
ExecStop=/usr/bin/fusermount -u $RCLONE_TARGET_DIR
|
|
ExecStop=/usr/bin/rm -Rf $CACHE_DIR
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |