[Libreoffice-commits] online.git: docker/Dockerfile docker/scripts

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 30 09:10:19 UTC 2019


 docker/Dockerfile          |    2 +-
 docker/scripts/run-lool.sh |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 2ae903e14723f379b45550244a0c2fd729a62a85
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Jan 29 07:30:03 2019 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Jan 30 10:10:01 2019 +0100

    Docker: Restart lool when config changes
    
    Brought here from https://github.com/CollaboraOnline/Docker-CODE/commit/334731d9e5127cf03236026d2ca6dbc1e1fef406
    
    Change-Id: Id64f631454e743f37a378d8b10a78c8d3d4c9f47
    Reviewed-on: https://gerrit.libreoffice.org/67041
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/docker/Dockerfile b/docker/Dockerfile
index c5948bb00..8f32fd8a5 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get upgrade -y
 # install LibreOffice run-time dependencies
 # install adduser, findutils, openssl and cpio that we need later
 # install an editor
-RUN apt-get -y install locales-all libpng16-16 libxinerama1 libgl1-mesa-glx libfontconfig1 libfreetype6 libxrender1 libxcb-shm0 libxcb-render0 adduser cpio findutils nano libpoco*50 libcap2-bin openssl
+RUN apt-get -y install locales-all libpng16-16 libxinerama1 libgl1-mesa-glx libfontconfig1 libfreetype6 libxrender1 libxcb-shm0 libxcb-render0 adduser cpio findutils nano libpoco*50 libcap2-bin openssl inotify-tools psmisc
 
 # tdf#117557 - Add CJK Fonts to LibreOffice Online Docker Image
 RUN apt-get -y install fonts-wqy-zenhei fonts-wqy-microhei fonts-droid-fallback fonts-noto-cjk
diff --git a/docker/scripts/run-lool.sh b/docker/scripts/run-lool.sh
index f9ec69338..662828ec7 100755
--- a/docker/scripts/run-lool.sh
+++ b/docker/scripts/run-lool.sh
@@ -33,5 +33,13 @@ perl -pi -e "s/localhost<\/host>/${domain}<\/host>/g" /etc/loolwsd/loolwsd.xml
 perl -pi -e "s/<username (.*)>.*<\/username>/<username \1>${username}<\/username>/" /etc/loolwsd/loolwsd.xml
 perl -pi -e "s/<password (.*)>.*<\/password>/<password \1>${password}<\/password>/" /etc/loolwsd/loolwsd.xml
 
+
+# Restart when /etc/loolwsd/loolwsd.xml changes
+[ -x /usr/bin/inotifywait -a /usr/bin/killall ] && (
+	/usr/bin/inotifywait -e modify /etc/loolwsd/loolwsd.xml
+	echo "$(ls -l /etc/loolwsd/loolwsd.xml) modified --> restarting"
+	/usr/bin/killall -1 loolwsd
+) &
+
 # Start loolwsd
 su -c "/usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/libreoffice --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd ${extra_params}" -s /bin/bash lool


More information about the Libreoffice-commits mailing list