-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathreload.sh
executable file
·44 lines (32 loc) · 1005 Bytes
/
reload.sh
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
42
43
44
#!/bin/bash
##### LEGACY SCRIPT. Will be deleted later. See issue #102. #####
# Sending a HANGUP signal to Gunicorn's master process will gracefully reload its children.
echo ""
echo " * Reloading Gunicorn (webinterface)..."
if [ -f /var/tmp/gunicorn--dsmr_webinterface.pid ];
then
cat /var/tmp/gunicorn--dsmr_webinterface.pid | xargs kill -HUP
echo " [x] Done!"
else
echo " !-- PID file does not exist (yet)"
fi
# Management commands have some mechanisme builtin as well for this.
echo ""
echo " * Reloading backend process..."
if [ -f /var/tmp/dsmrreader--dsmr_backend.pid ];
then
cat /var/tmp/dsmrreader--dsmr_backend.pid | xargs kill -HUP
echo " [x] Done!"
else
echo " !-- PID file does not exist (yet)"
fi
echo ""
echo " * Reloading datalogger process..."
if [ -f /var/tmp/dsmrreader--dsmr_datalogger.pid ];
then
cat /var/tmp/dsmrreader--dsmr_datalogger.pid | xargs kill -HUP
echo " [x] Done!"
else
echo " !-- PID file does not exist (yet)"
fi
echo ""