2022-11-12 13:25:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Elevate script
|
|
|
|
if [ ! "$UID" -eq 0 ]
|
|
|
|
then
|
2023-01-23 14:55:10 +00:00
|
|
|
sudo bash "$BASH_SOURCE";
|
2022-11-13 00:11:32 +00:00
|
|
|
else
|
2023-01-23 15:11:51 +00:00
|
|
|
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";
|
2022-11-12 13:25:48 +00:00
|
|
|
|
2023-01-23 15:11:51 +00:00
|
|
|
cp "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user;
|
2022-11-13 00:11:32 +00:00
|
|
|
fi
|