diff --git a/scripts/Common/Config/rclone/install.sh b/scripts/Common/Config/rclone/install.sh new file mode 100755 index 00000000..5e8acc90 --- /dev/null +++ b/scripts/Common/Config/rclone/install.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo cp "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user; diff --git a/scripts/Debian/Software/rclone/rclone@.service b/scripts/Common/Config/rclone/rclone@.service similarity index 100% rename from scripts/Debian/Software/rclone/rclone@.service rename to scripts/Common/Config/rclone/rclone@.service diff --git a/scripts/Debian/Software/rclone/install.sh b/scripts/Debian/Software/rclone/install.sh index ad361b0b..18465452 100755 --- a/scripts/Debian/Software/rclone/install.sh +++ b/scripts/Debian/Software/rclone/install.sh @@ -1,13 +1,16 @@ #!/bin/bash # Elevate script +pushd "${BASH_SOURCE%/*}" > /dev/null; + if [ ! "$UID" -eq 0 ] then sudo bash "$BASH_SOURCE"; + source "../../../Common/Config/rclone/install.sh"; else package="$(mktemp)"; wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb -O "$package"; dpkg -i "$package"; rm -f "$package"; - - cp "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user; fi + +popd;