#!/bin/bash

APP_NAME="getBilibiliSource"
JS_PATH="~/supucloud/h5player/server/getBilibiliSource.js"

RES=$(pm2 lsit | grep -q " $APP_NAME ")
echo "$RES"
# if pm2 show $APP_NAME &> /dev/null; then
#     RAW_STATUS=$(npx pm2 show $APP_NAME | awk '/status/ {print $4}')
#     STATUS=$(strip_colors "$RAW_STATUS")
#     if [ "$STATUS" == "online" ]; then
#       echo "Restaring existing $APP_NAME..."
#       pm2 restart $APP_NAME
#     else
# else
#     echo "Staring new $APP_NAME..."
#     pm2 start $JS_PATH --name $APP_NAME
# fi
echo "compelte!"
exit 0