-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.sh
More file actions
executable file
·42 lines (36 loc) · 1.08 KB
/
Copy pathstop.sh
File metadata and controls
executable file
·42 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
APP_PID_FILE="app.pid"
LISTENER_PID_FILE="listener.pid"
WORKER_PID_FIRE="worker.pid"
# Stop the Flask web application
if [ -f $APP_PID_FILE ]; then
APP_PID=$(cat $APP_PID_FILE)
echo "Stopping web application with PID: $APP_PID"
kill $APP_PID
rm $APP_PID_FILE
echo "Web application stopped."
else
echo "Web application not running (no PID file found)."
fi
# Stop the Telegram listener
if [ -f $LISTENER_PID_FILE ]; then
LISTENER_PID=$(cat $LISTENER_PID_FILE)
echo "Stopping Telegram listener with PID: $LISTENER_PID"
kill $LISTENER_PID
rm $LISTENER_PID_FILE
echo "Telegram listener stopped."
else
echo "Telegram listener not running (no PID file found)."
fi
echo "TeleFileDB shutdown complete."
# Stop the Telegram worker
if [ -f $WORKER_PID_FIRE ]; then
WORKER_PID=$(cat $WORKER_PID_FIRE)
echo "Stopping Telegram listener with PID: $WORKER_PID"
kill $WORKER_PID
rm $WORKER_PID_FIRE
echo "Telegram worker stopped."
else
echo "Telegram worker not running (no PID file found)."
fi
echo "TeleFileDB shutdown complete."