forked from ome/omero-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
82 lines (67 loc) · 1.47 KB
/
install.sh
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
set -e -u -x
DISTRO=
WEBSERVER=nginx
OMEROVER=omero
for arg in "$@"; do
case "$arg" in
centos6|ubuntu1404)
DISTRO="$arg"
;;
nginx|apache)
WEBSERVER="$arg"
;;
omero|omerodev)
OMEROVER="$arg"
;;
*)
echo "Unknown option: $arg";
exit 1
esac
done
if [ -z "$DISTRO" ]; then
echo "No distro specified"
exit 1
fi
source settings.env
if [ $DISTRO = centos6 ]; then
bash -eux dependencies-centos6.sh
else
bash -eux dependencies-ubuntu1404.sh
fi
bash -eux system_setup.sh
bash -eux setup_postgres.sh
cp settings.env setup_$OMEROVER.sh ~omero
if [ $WEBSERVER = apache ]; then
cp setup_omero_apache.sh ~omero
fi
su - omero -c "bash -eux setup_$OMEROVER.sh"
if [ $DISTRO = centos6 ]; then
if [ $WEBSERVER = nginx ]; then
bash -eux setup_nginx_centos6.sh
else
su - omero -c "bash -eux setup_omero_apache.sh"
bash -eux setup_apache_centos6.sh
fi
bash -eux setup_centos6_selinux.sh
else
if [ $WEBSERVER = nginx ]; then
bash -eux setup_nginx_ubuntu1404.sh
fi
fi
#If you don't want to use the init.d scripts you can start OMERO manually:
#su - omero -c "OMERO.server/bin/omero admin start"
#su - omero -c "OMERO.server/bin/omero web start"
if [ $DISTRO = centos6 ]; then
if [ $WEBSERVER = apache ]; then
bash -eux setup_omero_daemon_noweb_centos6.sh
else
bash -eux setup_omero_daemon_centos6.sh
fi
else
bash -eux setup_omero_daemon_ubuntu1404.sh
fi
bash -eux setup_permissions.sh
bash -eux setup_cron.sh
#service omero start
#service omero-web start