Add a separate script for configuring rclone

This commit is contained in:
Manuel Thalmann 2023-04-02 04:20:37 +02:00
parent 49277ad2bf
commit 3dd017e1d5
3 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,2 @@
#!/bin/bash
sudo cp "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user;

View file

@ -1,13 +1,16 @@
#!/bin/bash #!/bin/bash
# Elevate script # Elevate script
pushd "${BASH_SOURCE%/*}" > /dev/null;
if [ ! "$UID" -eq 0 ] if [ ! "$UID" -eq 0 ]
then then
sudo bash "$BASH_SOURCE"; sudo bash "$BASH_SOURCE";
source "../../../Common/Config/rclone/install.sh";
else else
package="$(mktemp)"; package="$(mktemp)";
wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb -O "$package"; wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb -O "$package";
dpkg -i "$package"; dpkg -i "$package";
rm -f "$package"; rm -f "$package";
cp "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user;
fi fi
popd;