Skip to content

Instantly share code, notes, and snippets.

@Dedsec1
Created December 17, 2016 19:16
Show Gist options
  • Save Dedsec1/e09d073f791a39358d022324e45891a8 to your computer and use it in GitHub Desktop.
Save Dedsec1/e09d073f791a39358d022324e45891a8 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# [Quick Box :: Install rclone]
#
# GITHUB REPOS
# GitHub _ packages : https://github.com/QuickBox/quickbox_packages
# LOCAL REPOS
# Local _ packages : ~/QuickBox/packages
# Author : QuickBox.IO | liara
# URL : https://plaza.quickbox.io
#
# QuickBox Copyright (C) 2016 QuickBox.io
# Licensed under GNU General Public License v3.0 GPL-3 (in short)
#
# You may copy, distribute and modify the software as long as you track
# changes/dates in source files. Any modifications to our software
# including (via compiler) GPL-licensed code must also be made available
# under the GPL along with build & install instructions.
local_setup=/root/QuickBox/setup/
OUTTO=/srv/rutorrent/home/db/output.log
MASTER=$(cat /srv/rutorrent/home/db/master.txt)
echo "Downloading rclone ... " >>"${OUTTO}" 2>&1;
rm -rf /usr/local/go
wget https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz
tar -xvf go1.7.4.linux-amd64.tar.gz
rm -rf go1.7.4.linux-amd64.tar.gz
sudo mv go /usr/local
mv go /usr/local
echo "Installing rclone ... " >>"${OUTTO}" 2>&1;
export GOROOT=/usr/local/go
export GOPATH=$HOME/
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
go get -u -v github.com/ncw/rclone; cp ~/bin/rclone /usr/sbin/ ; sudo chown root:root /usr/sbin/rclone; sudo chmod 755 /usr/sbin/rclone; service ssh restart
touch /install/.rclone.lock
echo "rclone installation complete!" >>"${OUTTO}" 2>&1;
echo >>"${OUTTO}" 2>&1;
echo >>"${OUTTO}" 2>&1;
echo "Close this dialog box to refresh your browser" >>"${OUTTO}" 2>&1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment