Dindai Hollow + : Critical Fixes+

node-20
Moe 2023-09-05 11:11:59 -07:00
parent ba42ac2cd8
commit 411b88aa54
6 changed files with 12 additions and 7 deletions

View File

@ -2,6 +2,7 @@
#Identify version of CentOS #Identify version of CentOS
version=$(rpm --eval %{centos_ver}) version=$(rpm --eval %{centos_ver})
DIR=$(dirname $0)
#Set script to use dnf or yum #Set script to use dnf or yum
if [ "$version" = 7 ]; then if [ "$version" = 7 ]; then
@ -85,7 +86,7 @@ echo "========================================================="
#Check if Node.js is installed #Check if Node.js is installed
if ! [ -x "$(command -v node)" ]; then if ! [ -x "$(command -v node)" ]; then
echo "Node.js not found, installing..." echo "Node.js not found, installing..."
sh nodejs-redhat.sh sh $DIR/nodejs-redhat.sh
else else
echo "Node.js is already installed..." echo "Node.js is already installed..."
echo "Version: $(node -v)" echo "Version: $(node -v)"

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
DIR=$(dirname $0)
if ! [ -x "$(command -v dnf)" ]; then if ! [ -x "$(command -v dnf)" ]; then
echo 'This installer does not run on systems without "dnf" package manager. Try "CentOS - Quick Install"' echo 'This installer does not run on systems without "dnf" package manager. Try "CentOS - Quick Install"'
exit 1 exit 1
@ -44,7 +45,7 @@ echo "========================================================="
#Check if Node.js is installed #Check if Node.js is installed
if ! [ -x "$(command -v node)" ]; then if ! [ -x "$(command -v node)" ]; then
echo "Node.js not found, installing..." echo "Node.js not found, installing..."
sh nodejs-redhat.sh sh $DIR/nodejs-redhat.sh
else else
echo "Node.js is already installed..." echo "Node.js is already installed..."
echo "Version: $(node -v)" echo "Version: $(node -v)"

View File

@ -1,9 +1,10 @@
#!/bin/bash #!/bin/bash
DIR=$(dirname $0)
echo "Shinobi - Do you want to Install Node.js?" echo "Shinobi - Do you want to Install Node.js?"
echo "(y)es or (N)o" echo "(y)es or (N)o"
read -r nodejsinstall read -r nodejsinstall
if [ "$nodejsinstall" = "y" ]; then if [ "$nodejsinstall" = "y" ]; then
sh nodejs-ubuntu.sh sh $DIR/nodejs-ubuntu.sh
fi fi
#Detect Ubuntu Version #Detect Ubuntu Version

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
DIR=$(dirname $0)
echo "=========================================================" echo "========================================================="
echo "==!! Shinobi : The Open Source CCTV and NVR Solution !!==" echo "==!! Shinobi : The Open Source CCTV and NVR Solution !!=="
echo "=========================================================" echo "========================================================="
@ -51,7 +52,7 @@ fi
if ! [ -x "$(command -v node)" ]; then if ! [ -x "$(command -v node)" ]; then
echo "=============" echo "============="
echo "Shinobi - Installing Node.js" echo "Shinobi - Installing Node.js"
sh nodejs-ubuntu.sh sh $DIR/nodejs-ubuntu.sh
else else
echo "Node.js Found..." echo "Node.js Found..."
echo "Version : $(node -v)" echo "Version : $(node -v)"

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
DIR=$(dirname $0)
echo "=========================================================" echo "========================================================="
echo "==!! Shinobi : The Open Source CCTV and NVR Solution !!==" echo "==!! Shinobi : The Open Source CCTV and NVR Solution !!=="
echo "=========================================================" echo "========================================================="
@ -55,7 +56,7 @@ if ! [ -x "$(command -v ifconfig)" ]; then
fi fi
echo "=============" echo "============="
echo "Shinobi - Installing Node.js" echo "Shinobi - Installing Node.js"
sh nodejs-ubuntu.sh sh $DIR/nodejs-ubuntu.sh
if ! [ -x "$(command -v npm)" ]; then if ! [ -x "$(command -v npm)" ]; then
sudo apt install npm -y sudo apt install npm -y
fi fi
@ -89,7 +90,6 @@ sqluser="root"
sudo mysql -e "source sql/user.sql" || true sudo mysql -e "source sql/user.sql" || true
echo "=============" echo "============="
echo "Shinobi - Install NPM Libraries" echo "Shinobi - Install NPM Libraries"
sudo npm i npm -g
sudo npm install --unsafe-perm sudo npm install --unsafe-perm
# sudo npm audit fix --force # sudo npm audit fix --force
echo "=============" echo "============="

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
DIR=$(dirname $0)
echo "=========================================================" echo "========================================================="
echo "==!! Shinobi : The Open Source CCTV and NVR Solution !!==" echo "==!! Shinobi : The Open Source CCTV and NVR Solution !!=="
echo "=========================================================" echo "========================================================="
@ -47,7 +48,7 @@ fi
if ! [ -x "$(command -v node)" ]; then if ! [ -x "$(command -v node)" ]; then
echo "=============" echo "============="
echo "Shinobi - Installing Node.js" echo "Shinobi - Installing Node.js"
sh nodejs-ubuntu.sh sh $DIR/nodejs-ubuntu.sh
else else
echo "Node.js Found..." echo "Node.js Found..."
echo "Version : $(node -v)" echo "Version : $(node -v)"