2 ##############################################################################
3 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
12 nginx_config='/etc/nginx/conf.d/yardstick.conf'
14 if [[ ! -e "${nginx_config}" ]];then
16 cat << EOF > "${nginx_config}"
19 server_name localhost;
20 index index.htm index.html;
23 uwsgi_pass unix:///home/opnfv/repos/yardstick/api/yardstick.sock;
29 # nginx service start when boot
30 cat << EOF >> /root/.bashrc
32 nginx_status=\$(service nginx status | grep not)
33 if [ -n "\${nginx_status}" ];then
35 uwsgi -i /home/opnfv/repos/yardstick/api/yardstick.ini