1
0
Fork 0
mirror of https://gitlab.com/Shinobi-Systems/ShinobiCE.git synced 2025-03-09 15:40:15 +00:00

Solar Plexus

- New Plugin structure with pluginBase.js
- New plugins : Object Detection with YoloV3 and Face Detection with Dlib
- Fix 2-Factor Authentication
This commit is contained in:
Moe 2018-11-17 10:45:40 -08:00
parent e0f7c135af
commit 24de55e45a
22 changed files with 1268 additions and 899 deletions

41
INSTALL/freenas.csh Normal file
View file

@ -0,0 +1,41 @@
#!/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 --force > & /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 "====================================="
echo "||===== Install Completed =====||"
echo "====================================="
echo "|| Login with the Superuser and ||"
echo "|| create a new user at ||"
echo "|| http://THIS_JAIL_IP:8080/super ||"
echo "||==================================="
echo "|| Superuser : admin@shinobi.video ||"
echo "|| Default Password : admin ||"
echo "====================================="

View file

@ -25,55 +25,40 @@ fi
#create super.json
if [ ! -e "./super.json" ]; then
echo "============="
echo "Shinobi - Do you want to enable superuser access?"
echo "This may be useful if passwords are forgotten or"
echo "if you would like to limit accessibility of an"
echo "account for business scenarios."
echo "(y)es or (N)o"
read createSuperJson
if [ "$createSuperJson" = "y" ] || [ "$createSuperJson" = "Y" ]; then
echo "Default Superuser : admin@shinobi.video"
echo "Default Password : admin"
echo "* You can edit these settings in \"super.json\" located in the Shinobi directory."
sudo cp super.sample.json super.json
fi
echo "Default Superuser : admin@shinobi.video"
echo "Default Password : admin"
echo "* You can edit these settings in \"super.json\" located in the Shinobi directory."
sudo cp super.sample.json super.json
fi
echo "============="
echo "Shinobi - Do you want to Install Node.js?"
echo "(y)es or (N)o"
read nodejsinstall
if [ "$nodejsinstall" = "y" ] || [ "$nodejsinstall" = "Y" ]; then
wget https://deb.nodesource.com/setup_8.x
chmod +x setup_8.x
./setup_8.x
if ! [ -x "$(command -v node)" ]; then
echo "============="
echo "Shinobi - Installing Node.js"
wget https://deb.nodesource.com/setup_9.x
chmod +x setup_9.x
./setup_9.x
sudo apt install nodejs -y
else
echo "Node.js Found..."
echo "Version : $(node -v)"
fi
if ! [ -x "$(command -v npm)" ]; then
sudo apt install npm -y
fi
sudo apt install make -y
echo "============="
echo "Shinobi - Do you want to Install FFMPEG?"
echo "(y)es or (N)o"
read ffmpeginstall
if [ "$ffmpeginstall" = "y" ] || [ "$ffmpeginstall" = "Y" ]; then
echo "Shinobi - Do you want to Install FFMPEG with apt or download a static version provided with npm?"
echo "(a)pt or (N)pm"
echo "Press [ENTER] for default (npm)"
read ffmpegstaticinstall
if [ "$ffmpegstaticinstall" = "a" ] || [ "$ffmpegstaticinstall" = "A" ]; then
if [ "$getubuntuversion" = "16" ] || [ "$getubuntuversion" < "16" ]; then
echo "============="
echo "Shinobi - Get FFMPEG 3.x from ppa:jonathonf/ffmpeg-3"
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y
sudo apt update -y && sudo apt install ffmpeg libav-tools x264 x265 -y
echo "============="
else
echo "============="
echo "Shinobi - Installing FFMPEG"
sudo apt install ffmpeg -y
echo "============="
fi
if ! [ -x "$(command -v ffmpeg)" ]; then
if [ "$getubuntuversion" = "16" ] || [ "$getubuntuversion" < "16" ]; then
echo "============="
echo "Shinobi - Get FFMPEG 3.x from ppa:jonathonf/ffmpeg-3"
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y
sudo apt update -y && sudo apt install ffmpeg libav-tools x264 x265 -y
else
sudo npm install ffbinaries
echo "============="
echo "Shinobi - Installing FFMPEG"
sudo apt install ffmpeg -y
fi
else
echo "FFmpeg Found..."
echo "Version : $(ffmpeg -version)"
fi
echo "============="
echo "Shinobi - Do you want to use MariaDB or SQLite3?"
@ -137,15 +122,6 @@ sudo chmod -R 755 .
touch INSTALL/installed.txt
dos2unix /home/Shinobi/INSTALL/shinobi
ln -s /home/Shinobi/INSTALL/shinobi /usr/bin/shinobi
if [ "$mysqlDefaultData" = "y" ] || [ "$mysqlDefaultData" = "Y" ]; then
echo "=====================================" > INSTALL/installed.txt
echo "======= Login Credentials =======" >> INSTALL/installed.txt
echo "|| Username : $userEmail" >> INSTALL/installed.txt
echo "|| Password : $userPasswordPlain" >> INSTALL/installed.txt
echo "|| API Key : $apiKey" >> INSTALL/installed.txt
echo "=====================================" >> INSTALL/installed.txt
echo "=====================================" >> INSTALL/installed.txt
fi
echo "Shinobi - Start Shinobi and set to start on boot?"
echo "(y)es or (N)o"
read startShinobi
@ -156,16 +132,6 @@ if [ "$startShinobi" = "y" ] || [ "$startShinobi" = "y" ]; then
sudo pm2 save
sudo pm2 list
fi
if [ "$mysqlDefaultData" = "y" ] || [ "$mysqlDefaultData" = "Y" ]; then
echo "details written to INSTALL/installed.txt"
echo "====================================="
echo "======= Login Credentials ======="
echo "|| Username : $userEmail"
echo "|| Password : $userPasswordPlain"
echo "|| API Key : $apiKey"
echo "====================================="
echo "====================================="
fi
if [ ! "$sqliteormariadb" = "M" ] && [ ! "$sqliteormariadb" = "m" ]; then
echo "====================================="
echo "||===== Install Completed =====||"