-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathprepare_host.sh
More file actions
47 lines (34 loc) · 819 Bytes
/
prepare_host.sh
File metadata and controls
47 lines (34 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Script to prepare a host for breedbase docker
# host needs a few dirs with correct permissions
# the dirs are mounted into the docker with the docker-compose.yml
# Run as:
# sudo bash prepare_host.pl /home/production
#
# Lukas, 2020-03-14
export DIR=""
if [ ! -z "$1" ]
then
echo "USING $1...";
export DIR="$1";
else
echo "USING $HOME...";
export DIR="$HOME";
fi
echo "Preparing directories... (Using $DIR)";
mkdir "$DIR/tmp"
chown www-data "$DIR/tmp"
mkdir "$DIR/archive"
chown www-data "$DIR/archive"
mkdir "$DIR/cache"
chown www-data "$DIR/cache"
mkdir "$DIR/images"
chown www-data "$DIR/images"
mkdir "$DIR/cluster"
chown www-data "$DIR/cluster"
mkdir "$DIR/pgdata"
chown postgres "$DIR/pgdata"
mkdir "$DIR/logs"
chown www-data "$DIR/logs"
mkdir "$DIR/blast"
echo "Done."