-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrun.sh
55 lines (40 loc) · 937 Bytes
/
run.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
#!/bin/sh
# Note: Entry point to birix container
# USE the trap if you need to also do manual cleanup after the service is stopped,
# or need to start multiple services in the one container
trap "shut_down" HUP INT QUIT KILL TERM
shut_down(){
# stop service and clean up here
if [[ $NOMYSQL == 1 ]];
then
echo "No sql"
else
service mysqld stop
fi
service nginx stop
service httpd stop
service sshd stop
service crond stop
}
# start service in background here
# memory=${BVAT_MEM:=262144}
/etc/init.d/bvat start
if [[ $NOMYSQL == 1 ]];
then
echo "No sql"
else
service mysqld start
fi
if [ ! -z "$TIMEZONE" ];
then
cp -f /usr/share/zoneinfo/$TIMEZONE /etc/localtime
fi
service crond start
service httpd start
service nginx start
service sshd start
echo "bitrix:$SSH_PASS" | chpasswd
echo "[hit ctrl-c to exit] or run 'docker stop <container>'"
while true; do sleep 1; done
shut_down
echo "exited $0"