From 378cdc846a072805f2c7be774a6dc0dfdd3c2685 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 3 May 2023 18:31:38 +0200 Subject: [PATCH] Change location of rclone mounts --- scripts/Common/Config/Fonts/NerdFont/install.sh | 2 +- scripts/Common/Config/Oh My Posh/install.sh | 2 +- scripts/Common/Config/rclone/install.sh | 2 ++ scripts/Common/Config/rclone/rclone@.service | 5 +++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/Common/Config/Fonts/NerdFont/install.sh b/scripts/Common/Config/Fonts/NerdFont/install.sh index e514d159..9b9fbb6a 100755 --- a/scripts/Common/Config/Fonts/NerdFont/install.sh +++ b/scripts/Common/Config/Fonts/NerdFont/install.sh @@ -11,6 +11,6 @@ else tempFile="$(sudo -u "$1" mktemp -d)/$fontFileBaseName"; destination=/usr/share/font/opentype; - sudo -u "$1" cp "$homeDir/$NEXTCLOUD_DIR/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile"; + sudo -u "$1" cp "$homeDir/.mnt/$NEXTCLOUD_DIR/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile"; cp "$tempFile" /usr/share/fonts/opentype; fi diff --git a/scripts/Common/Config/Oh My Posh/install.sh b/scripts/Common/Config/Oh My Posh/install.sh index e79064d1..6a7af624 100755 --- a/scripts/Common/Config/Oh My Posh/install.sh +++ b/scripts/Common/Config/Oh My Posh/install.sh @@ -2,4 +2,4 @@ NEXTCLOUD_DIR="${NEXTCLOUD_DIR}"; mkdir -p ~/.omp; -cp ~/$NEXTCLOUD_DIR/.omp/manuel.omp.json ~/.omp/manuel.omp.json; +cp ~/.mnt/$NEXTCLOUD_DIR/.omp/manuel.omp.json ~/.omp/manuel.omp.json; diff --git a/scripts/Common/Config/rclone/install.sh b/scripts/Common/Config/rclone/install.sh index e886db42..6bcdd180 100755 --- a/scripts/Common/Config/rclone/install.sh +++ b/scripts/Common/Config/rclone/install.sh @@ -1,3 +1,5 @@ #!/bin/bash sudo cp "${BASH_SOURCE%/*}/rclone.service" "${BASH_SOURCE%/*}/rclone.target" "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user; systemctl enable --user rclone; +mkdir ~/.mnt; +touch ~/.mnt/.trackerignore; diff --git a/scripts/Common/Config/rclone/rclone@.service b/scripts/Common/Config/rclone/rclone@.service index fea39a6c..78babe2c 100644 --- a/scripts/Common/Config/rclone/rclone@.service +++ b/scripts/Common/Config/rclone/rclone@.service @@ -9,13 +9,14 @@ ExecStart= \ bash -c ' \ target="${EXPRESSION%%":"*}"; \ dirname="${EXPRESSION#*":"}"; \ - mkdir -p "%h/$dirname"; \ + destination="%h/.mnt/$dirname"; \ + mkdir -p "$destination"; \ mkdir -p /tmp/rclone; \ /usr/bin/rclone mount \ --config=%h/.config/rclone/rclone.conf \ --vfs-cache-mode full \ --log-file /tmp/rclone/$target.log \ - $target: "%h/$dirname"' + $target: "$destination";' ExecStop=bash -c '/bin/fusermount -zu "%h/${EXPRESSION#*":"}"' Restart=always