forked from olavgg/moinmoin-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
executable file
·33 lines (30 loc) · 1.09 KB
/
start.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
#!/usr/bin/env sh
# If the data folder does not contain file 'initialized' it is most likely because
# the container is fresh and has been started with
# the volume option
if ! [ "$(ls -A /usr/local/share/moin/data/initialized 2>/dev/null)" ]; then
cp -r /usr/local/share/moin/bootstrap-data/* /usr/local/share/moin/data/
touch /usr/local/share/moin/data/initialized
chown -R www-data:www-data /usr/local/share/moin/data
fi
# Enable SSL by default
if [ "$NOSSL" = "1" ]; then
echo "*******USING NOSSL*******"
ln -sf /etc/nginx/sites-available/moinmoin-nossl.conf \
/etc/nginx/sites-enabled/moinmoin.conf
else
echo "*******USING SSL*******"
ln -sf /etc/nginx/sites-available/moinmoin-ssl.conf \
/etc/nginx/sites-enabled/moinmoin.conf
fi
service rsyslog start && service nginx start && uwsgi \
--uid www-data \
-s /tmp/uwsgi.sock \
--plugins python \
--pidfile /var/run/uwsgi-moinmoin.pid \
--wsgi-file server/moin.wsgi \
-M -p 4 \
--chdir /usr/local/share/moin \
--python-path /usr/local/share/moin \
--harakiri 30 \
--die-on-term