Add a separate script for configuring rclone
This commit is contained in:
parent
49277ad2bf
commit
3dd017e1d5
3 changed files with 7 additions and 2 deletions
2
scripts/Common/Config/rclone/install.sh
Executable file
2
scripts/Common/Config/rclone/install.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
sudo cp "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user;
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue