Improve the rclone service
This commit is contained in:
parent
b1bf448aa1
commit
12b54d0e24
1 changed files with 3 additions and 3 deletions
|
@ -9,15 +9,15 @@ ExecStart= \
|
|||
bash -c ' \
|
||||
target="${EXPRESSION%%":"*}"; \
|
||||
dirname="${EXPRESSION#*":"}"; \
|
||||
destination="%h/.mnt/$dirname"; \
|
||||
destination="$(realpath -m --relative-base "%h/.mnt" "$dirname")"; \
|
||||
mkdir -p "$destination"; \
|
||||
mkdir -p /tmp/rclone; \
|
||||
/usr/bin/rclone mount \
|
||||
--config=%h/.config/rclone/rclone.conf \
|
||||
--config="%h/.config/rclone/rclone.conf" \
|
||||
--vfs-cache-mode full \
|
||||
--log-file /tmp/rclone/$target.log \
|
||||
$target: "$destination";'
|
||||
ExecStop=bash -c '/bin/fusermount -zu "%h/${EXPRESSION#*":"}"'
|
||||
ExecStop=bash -c '/bin/fusermount -zu "$(realpath --relative-base "%h/.mnt" "${EXPRESSION#*":"}")"'
|
||||
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
|
Loading…
Reference in a new issue