From fc0c464216ba2ddccbe2e4b547f1c1c7feb70aa0 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Fri, 22 Nov 2019 10:12:33 +0100 Subject: [PATCH] Copy synctex executable to docker host (#129) --- server-ce/runit/clsi-sharelatex/run | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server-ce/runit/clsi-sharelatex/run b/server-ce/runit/clsi-sharelatex/run index 539e5f2239..c1469b6cfe 100755 --- a/server-ce/runit/clsi-sharelatex/run +++ b/server-ce/runit/clsi-sharelatex/run @@ -16,4 +16,17 @@ if [ -e '/var/run/docker.sock' ]; then usermod -aG dockeronhost www-data fi +# Copies over CSLI synctex to the host mounted volume, so it +# can be subsequently mounted in TexLive containers on Sandbox Compilation +SYNCTEX=/var/lib/sharelatex/bin/synctex +if [ ! -f "$SYNCTEX" ]; then + if [ "$DISABLE_SYNCTEX_BINARY_COPY" == "true" ]; then + echo ">> Copy of synctex executable disabled by DISABLE_SYNCTEX_BINARY_COPY flag, feature may not work" + else + echo ">> Copying synctex executable to the host" + mkdir -p $(dirname $SYNCTEX ) + cp /var/www/sharelatex/clsi/bin/synctex $SYNCTEX + fi +fi + exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/clsi/app.js >> /var/log/sharelatex/clsi.log 2>&1