-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
34 lines (30 loc) · 943 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# Install Backup Script
set -e
apt-get update && apt-get -y install unzip
# Cleanup previous versions
if [ -f /usr/local/bin/rclone ]; then
rm /usr/local/bin/rclone
fi
if [ -f /usr/local/bin/controller-backup ]; then
rm /usr/local/bin/controller-backup
fi
cd /tmp \
&& curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip \
&& unzip rclone-current-linux-amd64.zip \
&& cd rclone-*-linux-amd64 \
; \
mv rclone /usr/local/bin/ \
&& chmod 655 /usr/local/bin/rclone \
&& cd ~ \
; \
rm -rf /tmp/rclone* \
; \
curl https://raw.githubusercontent.com/ComputeStacks/controller-backups/main/backup.sh > /usr/local/bin/controller-backup \
&& chmod +x /usr/local/bin/controller-backup \
; \
curl https://raw.githubusercontent.com/ComputeStacks/controller-backups/main/rclone-cron.sh > /usr/local/bin/rclone-cron \
&& chmod +x /usr/local/bin/rclone-cron \
; \
mkdir -p /var/log/rclone