python3
Last change
on this file since 1112:8138afeb88c2 was 1007:445599cd5fea, checked in by István Váradi <ivaradi@…>, 5 years ago |
Files to create a Docker image running the MAVA website
|
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | if test "$1" = "mava"; then
|
---|
4 | if test ! -f /root/initialized; then
|
---|
5 | echo "Initial run, setting up some directories and symlinks"
|
---|
6 | if test ! -d /var/run/apache2; then
|
---|
7 | mkdir /var/run/apache2
|
---|
8 | fi
|
---|
9 |
|
---|
10 | if test ! -d /var/run/mysqld; then
|
---|
11 | install -m 755 -o mysql -g root -d /var/run/mysqld
|
---|
12 | fi
|
---|
13 |
|
---|
14 | mv /var/www/html /var/www/html.orig
|
---|
15 | ln -s /data/public_html/www /var/www/html
|
---|
16 |
|
---|
17 | mkdir -p /home/ftp/virtualmalev
|
---|
18 | ln -s /data/public_html /home/ftp/virtualmalev/public_html
|
---|
19 |
|
---|
20 | mkdir -p /home/mavasyst/public_html
|
---|
21 | ln -s /data/public_html /home/mavasyst/public_html/mava_old
|
---|
22 |
|
---|
23 | cd /etc/php/5.6/apache2
|
---|
24 | patch -p0 < /php.ini.patch
|
---|
25 | fi
|
---|
26 |
|
---|
27 | echo "Starting MySQL"
|
---|
28 | su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe" &
|
---|
29 |
|
---|
30 | if test ! -f /root/initialized; then
|
---|
31 | echo "Sleeping to let MySQL start up properly"
|
---|
32 | sleep 5
|
---|
33 |
|
---|
34 | echo "Loading database into MySQL"
|
---|
35 | cat /init.sql | mysql
|
---|
36 | cat /data/uvirtualmalev.sql | mysql mavasyst_mavaold
|
---|
37 |
|
---|
38 | touch /root/initialized
|
---|
39 | fi
|
---|
40 |
|
---|
41 | source /etc/apache2/envvars
|
---|
42 | exec apache2 -DFOREGROUND
|
---|
43 | else
|
---|
44 | exec "$@"
|
---|
45 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.