forked from deboyblog/docker-edusoho
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathentrypoint.sh
More file actions
36 lines (28 loc) · 849 Bytes
/
Copy pathentrypoint.sh
File metadata and controls
36 lines (28 loc) · 849 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
#!/bin/bash
#set -eo pipefail
#check required env vars
if [ -z "$DOMAIN" ]; then
echo >&2 'required option: -e DOMAIN="your_domain"'
exit 1
fi
hasInitd=
if [ -f "/.entrypoint-initd.lock" ]; then
hasInitd=true
else
hasInitd=false
fi
if [ !hasInitd ]; then
#extract edusoho
tar zxvf /var/www/edusoho-${EDUSOHO_VERSION}.tar.gz -C /var/www && chown -R www-data:www-data /var/www/edusoho && rm -rf /var/www/edusoho-${EDUSOHO_VERSION}.tar.gz
touch /.entrypoint-initd.lock
#mofidy domain for nginx vhost
sed -i "s/{{DOMAIN}}/${DOMAIN}/g" /etc/nginx/sites-enabled/edusoho.conf
fi
echo 'starting php5-fpm'
/etc/init.d/php5-fpm start >& /dev/null
echo 'starting nginx'
echo '***************************'
echo '* welcome to use edusoho! *'
echo '* --- www.edusoho.com --- *'
echo '***************************'
nginx