Add script to Update v2 to v3

cron-as-worker-process
Moe 2022-06-06 13:31:21 -07:00
parent 77792b5da2
commit 42838d7cda
1 changed files with 24 additions and 0 deletions

24
UPDATE-v2-to-v3.sh Normal file
View File

@ -0,0 +1,24 @@
echo "============="
echo "Updating Node.js to version 16..."
wget https://deb.nodesource.com/setup_16.x
chmod +x setup_16.x
./setup_16.x
apt install nodejs -y
apt install node-pre-gyp -y
rm setup_16.x
npm i npm -g
echo "============="
echo "Updating PM2..."
npm install pm2@latest -g
echo "============="
echo "Updating Shinobi dependencies..."
git reset --hard
git pull
rm -rf node_modules
npm install
echo "============="
echo "Restarting PM2..."
pm2 update