Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit e946112

Browse files
committed
Simplified ihsstart.sh
No need for traps and shutdown hooks, simply run IHS in foreground and it will handle the shutdowns properly. Fixes #23 Signed-off-by: Archimedes Trajano <[email protected]>
1 parent 51e4bdc commit e946112

File tree

1 file changed

+2
-35
lines changed

1 file changed

+2
-35
lines changed

ilan/ihsstart.sh

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,5 @@
77
# #
88
#####################################################################################
99

10-
startServer()
11-
{
12-
echo "Starting IBM HTTP Server "
13-
# Starting IBM HTTPServer
14-
/opt/IBM/HTTPServer/bin/apachectl start
15-
16-
if [ $? = 0 ]
17-
then
18-
echo "IBM HTTP Server started successfully"
19-
else
20-
echo "Failed to start IBM HTTP Server"
21-
fi
22-
}
23-
24-
stopServer()
25-
{
26-
echo "Stopping IBM HTTP Server "
27-
# Stopping IBM HTTPServer
28-
/opt/IBM/HTTPServer/bin/apachectl graceful-stop
29-
if [ $? = 0 ]
30-
then
31-
echo "IBM HTTP Server stopped successfully"
32-
fi
33-
}
34-
35-
startServer
36-
37-
trap "stopServer" SIGTERM
38-
39-
sleep 10
40-
41-
while [ -f "/opt/IBM/HTTPServer/logs/httpd.pid" ]
42-
do
43-
sleep 5
44-
done
10+
. /opt/IBM/HTTPServer/bin/envvars
11+
exec /opt/IBM/HTTPServer/bin/httpd -d /opt/IBM/HTTPServer -DFOREGROUND

0 commit comments

Comments
 (0)