Changed launch command, and loop that checks if ols is running

This commit is contained in:
lars-hagen
2020-01-14 21:08:40 +01:00
parent 97be7af1ee
commit 2c920625a6
4 changed files with 18 additions and 6 deletions
+1 -2
View File
@@ -28,5 +28,4 @@ COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /var/www/vhosts/
CMD ["/usr/local/lsws/bin/openlitespeed","-n"]
CMD ["/usr/local/lsws/bin/lswsctrl","start"]
+10 -1
View File
@@ -1,4 +1,13 @@
#!/bin/bash
chown 999:999 /usr/local/lsws/conf -R
chown 999:1000 /usr/local/lsws/admin/conf -R
exec "$@"
#start ols and ping it every 60 second to make sure it running, if not exist container (assuming ols crashed)
$@
while true; do
if ! /usr/local/lsws/bin/lswsctrl status | grep 'litespeed is running with PID *' > /dev/null; then
break
fi
sleep 60
done