aboutsummaryrefslogtreecommitdiffstats
path: root/docker/supervisor.sh
blob: a4104c7fbb5c2d2064b601b651e2691491249adb (plain)
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
#!/bin/bash
##############################################################################
# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

# nginx service start when boot
supervisor_config='/etc/supervisor/conf.d/yardstick.conf'

if [[ ! -e "${supervisor_config}" ]]; then

    cat << EOF > "${supervisor_config}"
[supervisord]
nodaemon = true

[program:nginx]
command = service nginx restart

[program:yardstick_uwsgi]
directory = /etc/yardstick
command = uwsgi -i yardstick.ini

[program:rabbitmq]
command=/etc/yardstick/rabbitmq.sh
EOF

fi