diff --git a/server-ce/Gruntfile.coffee b/server-ce/Gruntfile.coffee index db7f54fa4c..357e3c660a 100644 --- a/server-ce/Gruntfile.coffee +++ b/server-ce/Gruntfile.coffee @@ -425,16 +425,17 @@ module.exports = (grunt) -> chown sharelatex:sharelatex /var/log/sharelatex mkdir -p /var/lib/sharelatex - chown sharelatex:sharelatex /var/lib/sharelatex """ for dir in ["data/user_files", "tmp/uploads", "data/compiles", "data/cache", "tmp/dumpFolder"] after_install_script += """ mkdir -p /var/lib/sharelatex/#{dir} - chown sharelatex:sharelatex /var/lib/sharelatex/#{dir} - """ + + after_install_script += """ + chown -R sharelatex:sharelatex /var/lib/sharelatex + """ for service in SERVICES after_install_script += "service sharelatex-#{service.name} restart\n" diff --git a/server-ce/package/scripts/after_install.sh b/server-ce/package/scripts/after_install.sh index d33a4db6be..fa47d7d94b 100644 --- a/server-ce/package/scripts/after_install.sh +++ b/server-ce/package/scripts/after_install.sh @@ -9,18 +9,7 @@ mkdir -p /var/log/sharelatex chown sharelatex:sharelatex /var/log/sharelatex mkdir -p /var/lib/sharelatex -chown sharelatex:sharelatex /var/lib/sharelatex -mkdir -p /var/lib/sharelatex/data/user_files -chown sharelatex:sharelatex /var/lib/sharelatex/data/user_files -mkdir -p /var/lib/sharelatex/tmp/uploads -chown sharelatex:sharelatex /var/lib/sharelatex/tmp/uploads -mkdir -p /var/lib/sharelatex/data/compiles -chown sharelatex:sharelatex /var/lib/sharelatex/data/compiles -mkdir -p /var/lib/sharelatex/data/cache -chown sharelatex:sharelatex /var/lib/sharelatex/data/cache -mkdir -p /var/lib/sharelatex/tmp/dumpFolder -chown sharelatex:sharelatex /var/lib/sharelatex/tmp/dumpFolder -service sharelatex-web restart +mkdir -p /var/lib/sharelatex/data/user_filesmkdir -p /var/lib/sharelatex/tmp/uploadsmkdir -p /var/lib/sharelatex/data/compilesmkdir -p /var/lib/sharelatex/data/cachemkdir -p /var/lib/sharelatex/tmp/dumpFolderchown -R sharelatex:sharelatex /var/lib/sharelatexservice sharelatex-web restart service sharelatex-document-updater restart service sharelatex-clsi restart service sharelatex-filestore restart diff --git a/server-ce/package/upstart/sharelatex-chat b/server-ce/package/upstart/sharelatex-chat index 9ef1f1f87e..6f33cdf277 100644 --- a/server-ce/package/upstart/sharelatex-chat +++ b/server-ce/package/upstart/sharelatex-chat @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-clsi b/server-ce/package/upstart/sharelatex-clsi index 30368a074f..9fa4e3cba9 100644 --- a/server-ce/package/upstart/sharelatex-clsi +++ b/server-ce/package/upstart/sharelatex-clsi @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-docstore b/server-ce/package/upstart/sharelatex-docstore index d6a90b80d3..6cf35a1ed6 100644 --- a/server-ce/package/upstart/sharelatex-docstore +++ b/server-ce/package/upstart/sharelatex-docstore @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-document-updater b/server-ce/package/upstart/sharelatex-document-updater index 2e3e6ad3a0..f0a6cb356c 100644 --- a/server-ce/package/upstart/sharelatex-document-updater +++ b/server-ce/package/upstart/sharelatex-document-updater @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-filestore b/server-ce/package/upstart/sharelatex-filestore index de1e8ba330..9aacb585b0 100644 --- a/server-ce/package/upstart/sharelatex-filestore +++ b/server-ce/package/upstart/sharelatex-filestore @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-spelling b/server-ce/package/upstart/sharelatex-spelling index 4c2dcc86a1..4e9f36f394 100644 --- a/server-ce/package/upstart/sharelatex-spelling +++ b/server-ce/package/upstart/sharelatex-spelling @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-tags b/server-ce/package/upstart/sharelatex-tags index 34257b4863..d075865f1b 100644 --- a/server-ce/package/upstart/sharelatex-tags +++ b/server-ce/package/upstart/sharelatex-tags @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-template b/server-ce/package/upstart/sharelatex-template index 14af9ccd5a..9270388370 100644 --- a/server-ce/package/upstart/sharelatex-template +++ b/server-ce/package/upstart/sharelatex-template @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-track-changes b/server-ce/package/upstart/sharelatex-track-changes index c43207fd77..1e7df4980b 100644 --- a/server-ce/package/upstart/sharelatex-track-changes +++ b/server-ce/package/upstart/sharelatex-track-changes @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file diff --git a/server-ce/package/upstart/sharelatex-web b/server-ce/package/upstart/sharelatex-web index 1db599a1bd..122115a5fb 100644 --- a/server-ce/package/upstart/sharelatex-web +++ b/server-ce/package/upstart/sharelatex-web @@ -20,8 +20,9 @@ script # path to Node.js if it's not in your system PATH. NODE=node SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee + LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux echo $$ > /var/run/sharelatex-$SERVICE.pid chdir /var/www/sharelatex/$SERVICE - exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 + exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1 end script \ No newline at end of file