-
-
Save kassandry/5448740 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Log in to root user | |
apt-get update && apt-get install git-core build-essential emacs authbind runit scons libssl-dev curl -y | |
su - <unprivileged user> | |
git clone https://github.com/creationix/nvm.git ~/nvm && . ~/nvm/nvm.sh && nvm alias default v0.6.21 && nvm install v0.6.21 | |
# Add to .profile, .bashrc or equiv.: . ~/nvm/nvm.sh | |
curl http://files.cast-project.org/install.sh | sh | |
# Setup files needed for cast agent and runsvdir | |
mkdir -p $HOME/cast-data/services-enabled/ | |
mkdir $HOME/.cast | |
touch $HOME/.cast/config.json | |
echo {\"data_root\":\"$HOME/cast-data\"} > $HOME/.cast/config.json | |
# Use cron to start cast services on boot | |
echo "@reboot /usr/bin/runsvdir $HOME/cast-data/services-enabled/ > $HOME/runsvdir.log 2>&1" | crontab | |
crontab -l > crons | |
echo "@reboot /usr/local/bin/cast-agent > $HOME/cast-agent.log 2>&1" >> crons | |
crontab crons | |
rm crons | |
# Start Cast services | |
nohup /usr/bin/runsvdir $HOME/cast-data/services-enabled/ > $HOME/runsvdir.log 2>&1 & | |
nohup /usr/local/bin/cast-agent > $HOME/cast-agent.log 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment