Sylvain Desbureaux | e1b8ac6 | 2021-02-16 10:29:00 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | ### |
| 4 | # ============LICENSE_START======================================================= |
| 5 | # APPC |
| 6 | # ================================================================================ |
| 7 | # Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. |
| 8 | # Copyright (C) 2021 Orange Intellectual Property. All rights reserved. |
| 9 | # ================================================================================ |
| 10 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 11 | # you may not use this file except in compliance with the License. |
| 12 | # You may obtain a copy of the License at |
| 13 | # |
| 14 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | # |
| 16 | # Unless required by applicable law or agreed to in writing, software |
| 17 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 18 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 | # See the License for the specific language governing permissions and |
| 20 | # limitations under the License. |
| 21 | # ============LICENSE_END========================================================= |
| 22 | ### |
| 23 | |
| 24 | if [ -z "$CDT_PORT" ] |
| 25 | then |
| 26 | CDT_PORT="30232" |
| 27 | fi |
| 28 | echo "Setting CDT port to $CDT_PORT" |
| 29 | sed -i -e "s/30290/$CDT_PORT/" /opt/cdt/main.bundle.js |
| 30 | |
| 31 | CDT_HOME=/opt/cdt; export CDT_HOME |
| 32 | LOG_DIR=/opt/cdt/logs; export LOG_DIR |
| 33 | MaxLogSize=3000000; export MaxLogSize |
| 34 | PORT=18080; export PORT |
| 35 | if [ -z "$HTTPS_KEY_FILE" ] |
| 36 | then |
| 37 | HTTPS_KEY_FILE=/opt/cert/cdt-key.pem |
| 38 | export HTTPS_KEY_FILE |
| 39 | fi |
| 40 | if [ -z "$HTTPS_CERT_FILE" ] |
| 41 | then |
| 42 | HTTPS_CERT_FILE=/opt/cert/cdt-cert.pem |
| 43 | export HTTPS_CERT_FILE |
| 44 | fi |
| 45 | echo "*** cert file: ${HTTPS_CERT_FILE}" |
| 46 | echo "*** key file : ${HTTPS_KEY_FILE}" |
| 47 | node $CDT_HOME/app/ndserver.js |