Fuegovic commited on
Commit
0bcce5f
·
1 Parent(s): c92b350

Delete restart.sh

Browse files
Files changed (1) hide show
  1. restart.sh +0 -34
restart.sh DELETED
@@ -1,34 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Start the PandoraNext service in the background
4
- ./PandoraNext &
5
- PANDORA_PID=$!
6
-
7
- # Restart service function
8
- restart_service() {
9
- echo "Restarting PandoraNext service..."
10
- # Gracefully stop the PandoraNext service
11
- kill -SIGTERM $PANDORA_PID
12
- # Wait for the process to end before restarting
13
- wait $PANDORA_PID
14
- # Start the PandoraNext service again
15
- ./PandoraNext &
16
- PANDORA_PID=$!
17
- }
18
-
19
- # SIGTERM-handler for script termination
20
- term_handler() {
21
- echo "Stopping PandoraNext service..."
22
- kill -SIGTERM $PANDORA_PID
23
- wait $PANDORA_PID
24
- exit 0
25
- }
26
-
27
- # Trap SIGTERM signal for graceful shutdown
28
- trap 'term_handler' SIGTERM
29
-
30
- # Main loop to sleep for one hour then restart the service
31
- while true; do
32
- sleep 3600
33
- restart_service
34
- done