forked from ggianna/docker-bde-event-detection-sc7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
41 lines (29 loc) · 906 Bytes
/
entrypoint.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
#!/usr/bin/env bash
echo "Starting entrypoint script execution"
echo "===================================="
# event detection container entrypoint script
# copy default parameters
# /skel.sh all
# initialize modules
/driver.sh init
# start twitter rest service
/driver.sh rest twitterRest
# mark successful init
service tomcat7 status
if [ -s $ERROR_FILE ]; then
echo >&2 "Errors occured:"
echo >&2 "[$ERROR_FILE] contents:"
echo "-----------------"
cat $ERROR_FILE
echo "-----------------"
else
echo "Successful initialization!"
echo "OK" >> "$HEALTHCHECK_FILE"
echo "Finished entrypoint script execution"
echo "===================================="
echo;
echo "Starting to monitor latest logfile at [$LOG_DIR] directory:"
echo "---------------------------------------------------------------"
tail -n 20 -f "$( find $LOG_DIR -type f | head -1 )"
#tail -f "$HEALTHCHECK_FILE"
fi