#!/bin/bash
DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$DIR"

pm2 describe elite_aadharbot > /dev/null 2>&1
if [ $? -eq 0 ]; then
    pm2 restart elite_aadharbot
else
    pm2 start index.js --name "elite_aadharbot"
fi

pm2 save
pm2 status
