Skip to content

Instantly share code, notes, and snippets.

@Domin8-IPTV
Created March 4, 2020 15:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Domin8-IPTV/b51bc05aebe3eeba48a5c3d6afaf2d9d to your computer and use it in GitHub Desktop.
Save Domin8-IPTV/b51bc05aebe3eeba48a5c3d6afaf2d9d to your computer and use it in GitHub Desktop.
dropbox.sh
#!/bin/bash
#////////////////////////////////////////////////////////////
#===========================================================
# Dropbox FS Installer for Debian / Ubuntu
#===========================================================
# set environment
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LOG=/tmp/dropbox_fs.log
# are we running as root
if [ $(id -u) != "0" ]; then
echo "Installer needs to be run as 'root' user."
echo "Try again as root."
exit 1;
fi
# check debian / ubuntu os
if [ -n "$(command -v apt-get)" ]; then
clear
# start the installer
echo "---------------------"
echo "Installing Dropbox FS"
echo "---------------------"
echo " "
echo "Updating APT."
sudo apt-get update -y >> $LOG 2>&1
echo "Installing libfuse2"
sudo apt-get install -y libfuse2 >> $LOG 2>&1
echo "Installing python3-pip"
sudo apt-get install -y python3-pip >> $LOG 2>&1
echo "Installing dbxfs"
sudo pip3 install dbxfs >> $LOG 2>&1
mkdir -p /mnt/dropbox >> $LOG 2>&1
echo "Mounting /mnt/dropbox"
dbxfs /mnt/dropbox
echo " "
echo " "
echo "----------------"
echo "Install Complete"
echo "----------------"
echo " "
echo " "
echo "Now browse /mnt/dropbox and you will see all your files and folders."
else
echo "Installer only works with Debian / Ubuntu based operating systems."
echo "Ubuntu 16 / 18 works best."
echo " "
exit 1;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment