2014-05-15 16:45:24 +00:00
|
|
|
#!/bin/sh
|
2014-08-19 10:56:38 +00:00
|
|
|
# Create random secret keys (twice, once for http auth pass, once for cookie secret).
|
|
|
|
sed -i "0,/CRYPTO_RANDOM/s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
|
|
|
|
sed -i "0,/CRYPTO_RANDOM/s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
|
2014-08-18 14:13:48 +00:00
|
|
|
|
2014-05-15 16:45:24 +00:00
|
|
|
sudo adduser --system --group --home /var/www/sharelatex --no-create-home sharelatex
|
|
|
|
|
|
|
|
mkdir -p /var/log/sharelatex
|
|
|
|
chown sharelatex:sharelatex /var/log/sharelatex
|
2014-08-18 14:13:48 +00:00
|
|
|
|
|
|
|
mkdir -p /var/lib/sharelatex
|
2014-08-19 11:50:29 +00:00
|
|
|
mkdir -p /var/lib/sharelatex/data/user_files
|
|
|
|
mkdir -p /var/lib/sharelatex/tmp/uploads
|
|
|
|
mkdir -p /var/lib/sharelatex/data/compiles
|
|
|
|
mkdir -p /var/lib/sharelatex/data/cache
|
|
|
|
mkdir -p /var/lib/sharelatex/tmp/dumpFolder
|
|
|
|
chown -R sharelatex:sharelatex /var/lib/sharelatex
|
|
|
|
service sharelatex-web restart
|
2014-05-15 16:45:24 +00:00
|
|
|
service sharelatex-document-updater restart
|
|
|
|
service sharelatex-clsi restart
|
|
|
|
service sharelatex-filestore restart
|
|
|
|
service sharelatex-track-changes restart
|
|
|
|
service sharelatex-docstore restart
|
2014-08-18 14:13:48 +00:00
|
|
|
service sharelatex-chat restart
|
|
|
|
service sharelatex-tags restart
|
|
|
|
service sharelatex-spelling restart
|