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 PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java/jdk/jdk180/bin
27 CLASSPATH=`echo /opt/app/datartr/etc /opt/app/datartr/lib/*.jar | tr ' ' ':'`
31 ps -ef | grep java | grep node.NodeMain | sed -e 's/[^ ]* *//' -e 's/ .*//'
37 if [ "$ID" != "root" ]
39 echo drtrnode must be started as user datartr not $ID
42 if [ "$GRP" != "datartr" ]
44 echo drtrnode must be started as group datartr not $GRP
52 echo No certificate file available. Cannot start
58 echo drtrnode already running
62 mkdir -p /opt/app/datartr/spool/s
63 chmod 755 /opt/app/datartr/spool/s
65 rm -f /opt/app/datartr/etc/SHUTDOWN
66 nohup java org.onap.dmaap.datarouter.node.NodeMain </dev/null >/dev/null 2>&1 &
71 echo drtrnode startup failed
80 if [ "$ID" != "datartr" ]
82 echo drtrnode must be stopped as user datartr not $ID
85 if [ "$GRP" != "datartr" ]
87 echo drtrnode must be stopped as group datartr not $GRP
90 touch /opt/app/datartr/etc/SHUTDOWN
99 echo drtrnode not running
107 echo drtrnode running
109 echo drtrnode not running
129 echo "Usage: $0 { start | stop | restart }"