-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathservice.sh
More file actions
executable file
·19 lines (17 loc) · 631 Bytes
/
service.sh
File metadata and controls
executable file
·19 lines (17 loc) · 631 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# Check if forever is installed
if ! command -v forever &> /dev/null
then
echo "Forever package is not installed. Installing now..."
sudo npm install -g forever
else
echo "Forever package is already installed."
fi
# Check if a forever process is already running with matrix-googlevoice-bot.js
if forever list | grep -q "matrix-googlevoice-bot.js"
then
echo "A forever process is already running with matrix-googlevoice-bot.js"
else
echo "No forever process is running with matrix-googlevoice-bot.js. Starting a new process with 5 max retries..."
forever -m5 start matrix-googlevoice-bot.js
fi