November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

tc server run level RHEL7

ln -s /usr//tcServer/APP/bin/init.d.sh /etc/init.d/tc_APP
/sbin/chkconfig –add tc_APP
/sbin/chkconfig –level 2345 tc_APP on

#!/bin/sh
#
# —————————————————————————
# tc Runtime application server bootup script
#
# Copyright (c) 2009-2011 VMware, Inc. All rights reserved.
# —————————————————————————
# chkconfig: 2345 80 20
# description: Start up the tc Runtime application server
# version: 2.9.2.RELEASE
# build date: 20130514153934

# Source function library.

# The user account that will run the tc Runtime instance
TC_RUNTIME_USER=”tcserver”

# DO NOT EDIT BEYOND THIS LINE
RETVAL=$?

setup () {
PRG=”$0″

while [ -h “$PRG” ]; do
ls=`ls -ld “$PRG”`
link=`expr “$ls” : ‘.*-> \(.*\)$’`
if expr “$link” : ‘/.*’ > /dev/null; then
PRG=”$link”
else
PRG=`dirname “$PRG”`/”$link”
fi
done

# Get standard environment variables
PRGDIR=`dirname “$PRG”`

#Absolute path
PRGDIR=`cd “$PRGDIR” ; pwd -P`
}

stop() {
if [ -x “$PRGDIR/tcruntime-ctl.sh” ]; then
echo “Stopping tcServer”
/bin/su $TC_RUNTIME_USER $PRGDIR/tcruntime-ctl.sh stop
RETVAL=$?
else
echo “Startup script $PRGDIR/tcruntime-ctl.sh doesn’t exist or is not executable.”
RETVAL=255
fi
}

status() {
if [ -x “$PRGDIR/tcruntime-ctl.sh” ]; then
echo “Status-ing tcServer”
/bin/su $TC_RUNTIME_USER $PRGDIR/tcruntime-ctl.sh status
RETVAL=$?
else
echo “Startup script $PRGDIR/tcruntime-ctl.sh doesn’t exist or is not executable.”
RETVAL=255
fi
}

start() {
if [ -x “$PRGDIR/tcruntime-ctl.sh” ]; then
echo “Starting tcServer”
/bin/su $TC_RUNTIME_USER $PRGDIR/tcruntime-ctl.sh start
RETVAL=$?
else
echo “Startup script $PRGDIR/tcruntime-ctl.sh doesn’t exist or is not executable.”
RETVAL=255
fi
echo “TEST: $PRGDIR : $TC_RUNTIME_USER : `ls -l $PRGDIR/tcruntime-ctl.sh`” > /tmp/test.log

}

#setup
PRGDIR=”/usr/mware/tcServerApps/VEESQ01/bin”

case “$1″ in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo $”Usage: $0 {start|stop|restart|status}”
exit 1
;;
esac

exit $RETVAL

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>