From ef8f099b10971fb77166c0fae903c0c73e3a2ca1 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) --- runit/clsi-sharelatex/run | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/runit/clsi-sharelatex/run b/runit/clsi-sharelatex/run index 539e5f2239..c1469b6cfe 100755 --- a/runit/clsi-sharelatex/run +++ b/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