manniru
5/26/2017 - 5:52 PM

Raspberry PI Setup Scripts

Raspberry PI Setup Scripts

#!/bin/bash

# Install node
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs

# Install required global npm modules
sudo npm install -g forever
sudo npm install -g grunt

mkdir -p ~/dev
cd ~/dev
git clone https://github.com/simontaylor81/HomeAutomation ha

# Run update script to actually build and start the server.
~/dev/ha/MasterServer/update

# Add to crontab to re-run at startup
(crontab -l ; echo "@reboot NODE_ENV=production forever start -a ~/dev/ha/MasterServer/server.js")| crontab -
Basic instructions: https://github.com/xybu/onedrived-dev

Incomplete list of requirements:
sudo apt-get install build-essential python3-dev libssl-dev inotify-tools python3-dbus libdbus-glib-1-dev libffi-dev
sudo pip3 install -U keyrings.alt

Ignore pattern:
/*
!/Music
Setting up the pi
=================

General:
sudo apt-get update && sudo apt-get upgrade -y

HA:
curl -sL https://gist.githubusercontent.com/simontaylor81/f2eb9f3068466687b99ff7c8a33c1699/raw/install_ha.sh | bash -

Docker:
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi

Cast Input Select:
docker run --network=host -d --restart=always --name=cast-input-select simontaylor81/cast-input-select

Plex:
sudo chown pi /media
docker run -d --restart=always --name plex --net=host -v /media:/media jaymoulin/rpi-plex
docker exec plex apk update && docker exec plex apk upgrade