Fix non-functioning rclone service

This commit is contained in:
Manuel Thalmann 2024-01-17 14:55:07 +01:00
parent c6ad6a9a25
commit 23d58449bf

View file

@ -9,7 +9,7 @@ ExecStart= \
bash -c ' \
target="${EXPRESSION%%":"*}"; \
dirname="${EXPRESSION#*":"}"; \
destination="$(realpath -m --relative-base "%h/.mnt" "$dirname")"; \
destination="`cd "%h/.mnt"; realpath -m "$dirname"`"; \
mkdir -p "$destination"; \
mkdir -p /tmp/rclone; \
/usr/bin/rclone mount \
@ -17,7 +17,7 @@ ExecStart= \
--vfs-cache-mode full \
--log-file /tmp/rclone/$target.log \
$target: "$destination";'
ExecStop=bash -c '/bin/fusermount -zu "$(realpath --relative-base "%h/.mnt" "${EXPRESSION#*":"}")"'
ExecStop=bash -c '/bin/fusermount -zu "`cd "%h/.mnt"; realpath "${EXPRESSION#*":"}"`"'
Restart=always
RestartSec=10