forked from smilebasti/npmGrafStats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
29 lines (23 loc) · 771 Bytes
/
start.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
#!/bin/bash
echo "npmGrafStats: v2.4.1"
echo "Startup: lets get the logs send them to influx"
if [ "$REDIRECTION_LOGS" = "TRUE" ]
then
echo "Redirection and Reverse-Proxy Logs activated"
bash /root/.config/NPMGRAF/sendips.sh &
bash /root/.config/NPMGRAF/sendredirectionips.sh &
elif [ "$REDIRECTION_LOGS" = "ONLY" ]
then
echo "Only Redirection Logs activated"
bash /root/.config/NPMGRAF/sendredirectionips.sh
else
echo "Only Reverse-Proxy Logs activated"
bash /root/.config/NPMGRAF/sendips.sh
fi
sleep 0.5
# reads from standard input and writes to standard output and in file
tee /root/.config/NPMGRAF/nohup.out > /proc/1/fd/1 2>/proc/1/fd/2
# Wait for any process to exit
wait -n
# Exit with status of process that exited first
exit $?