4 # Copyright 2016 RIFT.IO Inc
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
20 echo "usage: launch_ui.sh [--enable-https --keyfile-path=<keyfile_path> --certfile-path=<certfile-path>]"
25 echo "Killing any previous instance of server_composer_ui.py"
26 ps
-ef |
awk '/[s]cripts\/server_composer_ui.py/{print $2}' |
xargs kill -9
28 echo "Running Python webserver. HTTPS Enabled: ${ENABLE_HTTPS}"
30 if [ ! -z "${ENABLE_HTTPS}" ]; then
31 ..
/scripts
/server_composer_ui.py
--enable-https --keyfile-path="${KEYFILE_PATH}" --certfile-path="${CERTFILE_PATH}"&
33 ..
/scripts
/server_composer_ui.py
41 -k=*|
--keyfile-path=*)
42 KEYFILE_PATH
="${i#*=}"
43 shift # past argument=value
45 -c=*|
--certfile-path=*)
46 CERTFILE_PATH
="${i#*=}"
47 shift # past argument=value
55 shift # past argument=value
63 if [[ ! -z "${ENABLE_HTTPS}" ]]; then
64 if [ -z "${KEYFILE_PATH}" ] ||
[ -z "{CERTFILE_PATH}" ]; then
70 # change to the directory of this script
71 THIS_DIR
=$
( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
73 # Call function to start web and API servers