Skip to content

Commit

Permalink
Added a linux check/install for pm2 package
Browse files Browse the repository at this point in the history
  • Loading branch information
sfaber34 committed May 20, 2024
1 parent a6470d8 commit 828942f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/nextjs/public/bgnodes.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# TODO: Add Mac and Windows prereq installs (see checkWindowsPrereqs() in index.js)
# TODO: Make sure curl (not default on Linux) and wget (not default on mac) is installed (check windows availability too)

# Default values for the options
e="reth"
c="lighthouse"
Expand Down Expand Up @@ -104,8 +107,24 @@ if [ "$os_name" = "Linux" ]; then
color "1" "Installing LZ4"
sudo apt-get install lz4
fi

if npm list -g pm2 >/dev/null 2>&1; then
color "36" "pm2 is installed."
else
color "1" "Installing pm2."
npm install pm2@latest -g
fi
fi

# if [ "$os_name" = "Darwin" ]; then
# if npm list -g pm2 >/dev/null 2>&1; then
# color "36" "pm2 is installed."
# else
# color "1" "Installing pm2."
# npm install pm2@latest -g
# fi
# fi

if [ ! -d "~/nodes-script" ]; then
color "1" "Cloning BGNodes repo"
cd ~
Expand Down

0 comments on commit 828942f

Please sign in to comment.