Created
November 14, 2016 23:51
-
-
Save benyanke/e6271c60977fba5458708c41df214cd4 to your computer and use it in GitHub Desktop.
LBRY Server Setup - Setup script to install LBRY on a headless debian or ubuntu server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################# | |
# Written by Ben Yanke | |
# https://github.com/benyanke | |
# | |
# This script sets up the lbry daemon | |
# for use on a headless server. | |
# | |
# Currently tested on Ubuntu Server 16.04.1 LTS | |
# Likely to work on other ubuntu and debian-based OSes. | |
################################# | |
# Root check | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# Get the currently running user (normal user vars will return "root") | |
user=${SUDO_USER:-$(whoami)} | |
userHome=$(eval echo "~$user") | |
installPath="$userHome/lbryInfo" | |
initDFile="/etc/init.d/lbry" | |
# Change this to update DEB file | |
debFile="http://lbry.io/get/lbry.deb" | |
mkdir -p $installPath | |
wget $debFile -O $installPath/inst.deb | |
# Install dependencies | |
apt-get update | |
apt-get install libgmp3-dev build-essential python2.7 python2.7-dev python-pip git python-virtualenv libssl-dev libffi-dev -y | |
# Install package | |
dpkg -i $installPath/inst.deb | |
apt-get install -f -y | |
# Add to startup | |
touch $initDFile | |
chmod +x $initDFile | |
echo "#!/bin/bash" >> $initDFile | |
echo "" >> $initDFile | |
echo $(which lbrynet-daemon) " &" >> $initDFile | |
# Run now | |
lbrynet-daemon & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i am bitch