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

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

pm2 save
pm2 status
