resilio Upgrade Script for Linux

From KlavoWiki
Revision as of 00:26, 15 September 2016 by David (talk | contribs)
Jump to navigationJump to search

The following script will download the latest version of resilio and overwrite the current binary file.

The script assumes the follolwing:

  • that resilio is install in the folder /opt/resilio/bin/
  • the device is an ARM processor

NOTE: Based on ARM processor.

#!/bin/bash
if [[ ${EUID} -ne 0 ]]; then
        echo " !!! This tool must be run as root"
        exit 1
fi


DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

service resilio stop
sleep 3

cd /opt/resilio/bin/
wget https://download-cdn.getsync.com/stable/linux-arm/resilio-sync_arm.tar.gz

tar xvf resilio-sync_arm.tar.gz
rm -f resilio-sync_arm.tar.gz
service resilio start

cd $DIR