diff --git a/scripts/Common/Config/rclone/rclone@.service b/scripts/Common/Config/rclone/rclone@.service index 78babe2c..501aeb97 100644 --- a/scripts/Common/Config/rclone/rclone@.service +++ b/scripts/Common/Config/rclone/rclone@.service @@ -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