00_make_sharelatex_data_dirs.sh 952 Bytes
Newer Older
James Allen's avatar
James Allen committed
1 2
#!/bin/sh
mkdir -p /var/lib/sharelatex/data
Henry Oswald's avatar
Henry Oswald committed
3
chown www-data:www-data /var/lib/sharelatex/data
James Allen's avatar
James Allen committed
4 5

mkdir -p /var/lib/sharelatex/data/user_files
Henry Oswald's avatar
Henry Oswald committed
6
chown www-data:www-data /var/lib/sharelatex/data/user_files
James Allen's avatar
James Allen committed
7 8

mkdir -p /var/lib/sharelatex/data/compiles
Henry Oswald's avatar
Henry Oswald committed
9
chown www-data:www-data /var/lib/sharelatex/data/compiles
James Allen's avatar
James Allen committed
10 11

mkdir -p /var/lib/sharelatex/data/cache
Henry Oswald's avatar
Henry Oswald committed
12
chown www-data:www-data /var/lib/sharelatex/data/cache
James Allen's avatar
James Allen committed
13

14 15 16
mkdir -p /var/lib/sharelatex/data/templates
chown www-data:www-data /var/lib/sharelatex/data/templates

James Allen's avatar
James Allen committed
17
mkdir -p /var/lib/sharelatex/tmp
Henry Oswald's avatar
Henry Oswald committed
18
chown www-data:www-data /var/lib/sharelatex/tmp
James Allen's avatar
James Allen committed
19 20

mkdir -p /var/lib/sharelatex/tmp/uploads
Henry Oswald's avatar
Henry Oswald committed
21
chown www-data:www-data /var/lib/sharelatex/tmp/uploads
James Allen's avatar
James Allen committed
22 23

mkdir -p /var/lib/sharelatex/tmp/dumpFolder
Henry Oswald's avatar
Henry Oswald committed
24 25
chown www-data:www-data /var/lib/sharelatex/tmp/dumpFolder

26 27 28
if [ ! -e "/var/lib/sharelatex/data/db.sqlite" ]; then
       touch /var/lib/sharelatex/data/db.sqlite
fi
Henry Oswald's avatar
Henry Oswald committed
29

30
chown www-data:www-data /var/lib/sharelatex/data/db.sqlite