2 # ============LICENSE_START=======================================================
4 # ================================================================================
5 # Copyright © 2018 AT&T Intellectual Property. All rights reserved.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=========================================================
20 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
25 JAVA_HOME=/opt/java/jdk/jdk180
26 JAVA_OPTS="-Xms2G -Xmx8G"
28 PATH=$JAVA_HOME/bin:/bin:/usr/bin
29 CLASSPATH=`echo /opt/app/datartr/etc /opt/app/datartr/lib/*.jar | tr ' ' ':'`
30 export CLASSPATH JAVA_HOME JAVA_OPTS TZ PATH
33 pgrep -u datartr -f provisioning.Main
39 if [ "$ID" != "root" ]
41 echo drtrprov must be started as user datartr not $ID
44 # if [ "$GRP" != "datartr" ]
46 # echo drtrprov must be started as group datartr not $GRP
54 # echo No certificate file available. Cannot start
57 if [ "`pgrep -u mysql mysqld`" = "" ]
59 echo MariaDB is not running. It must be started before drtrprov
65 echo drtrprov already running
68 echo '0 1 * * * /opt/app/datartr/bin/runreports' | crontab
69 nohup java $JAVA_OPTS org.onap.dmaap.datarouter.provisioning.Main </dev/null &
74 echo drtrprov startup failed
83 if [ "$ID" != "datartr" ]
85 echo drtrprov must be stopped as user datartr not $ID
88 if [ "$GRP" != "datartr" ]
90 echo drtrprov must be stopped as group datartr not $GRP
93 /usr/bin/curl http://127.0.0.1:8080/internal/halt
101 echo drtrprov stopped
103 echo drtrprov not running
111 echo drtrprov running
113 echo drtrprov not running
133 echo "Usage: $0 { start | stop | restart | status }"