Skip to content

Instantly share code, notes, and snippets.

@bradwindy
Created June 28, 2020 10:00
Show Gist options
  • Save bradwindy/339ec6d4cd9ff1aabc0252edd806f35d to your computer and use it in GitHub Desktop.
Save bradwindy/339ec6d4cd9ff1aabc0252edd806f35d to your computer and use it in GitHub Desktop.
Shinobi FreeNAS Install Script
#!/bin/tcsh
echo "Installing updates..."
pkg update -f
pkg upgrade -y
echo "Installing packages..."
pkg install -y nano ffmpeg libav x264 x265 mysql56-server node npm
echo "Enabling mysql..."
sysrc mysql_enable=yes
service mysql-server start
echo "Cloning the official Shinobi Community Edition gitlab repo..."
git clone "https://gitlab.com/Shinobi-Systems/ShinobiCE"
cd ./ShinobiCE
echo "Adding Shinobi user to database..."
mysql -h localhost -u root -e "source sql/user.sql"
ehco "Shinobi database framework setup..."
mysql -h localhost -u root -e "source sql/framework.sql"
echo "Securing mysql..."
#/usr/local/bin/mysql_secure_installation
#mysql -h localhost -u root -e "source sql/secure_mysql.sq"
npm i npm -g
#There are some errors in here that I don't want you to see. Redirecting to dev null :D
npm install --unsafe-perm > & /dev/null
npm audit fix --unsafe-perm > & /dev/null
npm install pm2 -g
cp conf.sample.json conf.json
cp super.sample.json super.json
pm2 start camera.js
pm2 start cron.js
pm2 save
pm2 list
pm2 startup rcd
echo "login at http://THIS_JAIL_IP:8080/super"
echo "[email protected] / admin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment