This repository was archived by the owner on Nov 23, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,8 @@ apt-get update
1717# Install the Collabora packages
1818apt-get -y install loolwsd code-brand collaboraoffice5.3-dict* collaboraofficebasis5.3*
1919
20+ # Install inotifywait and killall to automatic restart loolwsd, if loolwsd.xml changes
21+ apt-get -y install inotify-tools psmisc
22+
2023# Cleanup
2124rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -31,5 +31,12 @@ perl -pi -e "s/<password (.*)>.*<\/password>/<password \1>${password}<\/password
3131perl -pi -e " s/<server_name (.*)>.*<\/server_name>/<server_name \1>${server_name} <\/server_name>/" /etc/loolwsd/loolwsd.xml
3232perl -pi -e " s/<allowed_languages (.*)>.*<\/allowed_languages>/<allowed_languages \1>${dictionaries:- de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru} <\/allowed_languages>/" /etc/loolwsd/loolwsd.xml
3333
34+ # Restart when /etc/loolwsd/loolwsd.xml changes
35+ [ -x /usr/bin/inotifywait -a /usr/bin/killall ] && (
36+ /usr/bin/inotifywait -e modify /etc/loolwsd/loolwsd.xml
37+ echo " $( ls -l /etc/loolwsd/loolwsd.xml) modified --> restarting"
38+ /usr/bin/killall -1 loolwsd
39+ ) &
40+
3441# Start loolwsd
3542su -c " /usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.3 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd ${extra_params} " -s /bin/bash lool
You can’t perform that action at this time.
0 commit comments