Skip to content

Instantly share code, notes, and snippets.

@pranavk
Created January 19, 2018 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pranavk/3014847db661cd671e0b579ac4a9de30 to your computer and use it in GitHub Desktop.
Save pranavk/3014847db661cd671e0b579ac4a9de30 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Fix lool resolv.conf problem (wizdude)
rm /opt/lool/systemplate/etc/resolv.conf
ln -s /etc/resolv.conf /opt/lool/systemplate/etc/resolv.conf
# Replace trusted host and set admin username and password
#perl -pi -e "s/localhost<\/host>/${domain}<\/host>/g" /etc/loolwsd/loolwsd.xml
#perl -pi -e "s/<username desc=\"The username of the admin console. Must be set.\"><\/username>/<username desc=\"The username of the admin console. Must be set.\">${username}<\/username>/" /etc/loolwsd/loolwsd.xml
#perl -pi -e "s/<password desc=\"The password of the admin console. Must be set.\"><\/password>/<password desc=\"The password of the admin console. Must be set.\">${password}<\/password>/g" /etc/loolwsd/loolwsd.xml
perl -pi -e "s/<server_name desc=\"Hostname:port of the server running loolwsd. If empty, it's derived from the request.\" type=\"string\" default=\"\"><\/server_name>/<server_name desc=\"Hostname:port of the server running loolwsd. If empty, it's derived from the request.\" type=\"string\" default=\"\">${server_name}<\/server_name>/g" /etc/loolwsd/loolwsd.xml
# Start loolwsd
su -c "/usr/bin/loolwsd --version --disable-ssl --o:storage.filesystem[@allow]=true --o:logging.level=trace --o:logging.file.property[7]=true --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" -s /bin/bash lool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment