diff --git a/scripts/build.sh b/scripts/build.sh index 6401cd9..c777f70 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,3 +1,4 @@ -#!/bin/bash -cd /home/ubuntu/rp-api -yarn build +#!/bin/bash +cd /home/ubuntu/rp-api +yarn build + diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh index c30a3a3..a94a6bb 100644 --- a/scripts/install_dependencies.sh +++ b/scripts/install_dependencies.sh @@ -1,11 +1,13 @@ -#!/bin/bash -cd /home/ubuntu/rp-api -sudo yarn +#!/bin/bash +cd /home/ubuntu/rp-api +sudo yarn + +sudo pm2 describe appname 2>&1 /dev/null +RUNNING=$? + + +if [ "${RUNNING}" -eq 0 ]; then +sudo pm2 start build/app.js --name RP_API -i 2 --wait-ready --listen-timeout 10000 +fi; + -sudo pm2 describe appname 2>&1 /dev/null -RUNNING=$? - - -if [ "${RUNNING}" -eq 0 ]; then -sudo pm2 start build/app.js --name RP_API -i 2 --wait-ready --listen-timeout 10000 -fi; diff --git a/scripts/reload_server.sh b/scripts/reload_server.sh index 2826ed7..7ffb010 100644 --- a/scripts/reload_server.sh +++ b/scripts/reload_server.sh @@ -1,3 +1,3 @@ -#!/bin/bash -cd /home/ubuntu/rp-api -sudo pm2 reload RP_API \ No newline at end of file +#!/bin/bash +cd /home/ubuntu/rp-api +sudo pm2 reload RP_API