{"id":7124,"date":"2017-10-30T09:35:27","date_gmt":"2017-10-30T01:35:27","guid":{"rendered":"http:\/\/rmohan.com\/?p=7124"},"modified":"2017-10-30T09:36:43","modified_gmt":"2017-10-30T01:36:43","slug":"tc-server-run-level","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7124","title":{"rendered":"tc server run level RHEL7"},"content":{"rendered":"<p>ln -s \/usr\/\/tcServer\/APP\/bin\/init.d.sh \/etc\/init.d\/tc_APP<br \/>\n\/sbin\/chkconfig &#8211;add tc_APP<br \/>\n\/sbin\/chkconfig &#8211;level 2345 tc_APP on <\/p>\n<p>#!\/bin\/sh<br \/>\n#<br \/>\n# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n# tc Runtime application server bootup script<br \/>\n#<br \/>\n# Copyright (c) 2009-2011 VMware, Inc.  All rights reserved.<br \/>\n# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n# chkconfig: 2345 80 20<br \/>\n# description: Start up the tc Runtime application server<br \/>\n# version: 2.9.2.RELEASE<br \/>\n# build date: 20130514153934<\/p>\n<p># Source function library.<\/p>\n<p># The user account that will run the tc Runtime instance<br \/>\nTC_RUNTIME_USER=&#8221;tcserver&#8221;<\/p>\n<p># DO NOT EDIT BEYOND THIS LINE<br \/>\nRETVAL=$?<\/p>\n<p>setup () {<br \/>\n        PRG=&#8221;$0&#8243;<\/p>\n<p>        while [ -h &#8220;$PRG&#8221; ]; do<br \/>\n                ls=`ls -ld &#8220;$PRG&#8221;`<br \/>\n                link=`expr &#8220;$ls&#8221; : &#8216;.*-> \\(.*\\)$&#8217;`<br \/>\n                if expr &#8220;$link&#8221; : &#8216;\/.*&#8217; > \/dev\/null; then<br \/>\n                        PRG=&#8221;$link&#8221;<br \/>\n                else<br \/>\n                        PRG=`dirname &#8220;$PRG&#8221;`\/&#8221;$link&#8221;<br \/>\n                fi<br \/>\n        done<\/p>\n<p>        # Get standard environment variables<br \/>\n        PRGDIR=`dirname &#8220;$PRG&#8221;`<\/p>\n<p>        #Absolute path<br \/>\n        PRGDIR=`cd &#8220;$PRGDIR&#8221; ; pwd -P`<br \/>\n}<\/p>\n<p>stop() {<br \/>\n        if [ -x &#8220;$PRGDIR\/tcruntime-ctl.sh&#8221; ]; then<br \/>\n                echo &#8220;Stopping tcServer&#8221;<br \/>\n                \/bin\/su $TC_RUNTIME_USER $PRGDIR\/tcruntime-ctl.sh stop<br \/>\n                RETVAL=$?<br \/>\n        else<br \/>\n                echo &#8220;Startup script $PRGDIR\/tcruntime-ctl.sh doesn&#8217;t exist or is not executable.&#8221;<br \/>\n                RETVAL=255<br \/>\n        fi<br \/>\n}<\/p>\n<p>status() {<br \/>\n        if [ -x &#8220;$PRGDIR\/tcruntime-ctl.sh&#8221; ]; then<br \/>\n                echo &#8220;Status-ing tcServer&#8221;<br \/>\n                \/bin\/su $TC_RUNTIME_USER $PRGDIR\/tcruntime-ctl.sh status<br \/>\n                RETVAL=$?<br \/>\n        else<br \/>\n                echo &#8220;Startup script $PRGDIR\/tcruntime-ctl.sh doesn&#8217;t exist or is not executable.&#8221;<br \/>\n                RETVAL=255<br \/>\n        fi<br \/>\n}<\/p>\n<p>start() {<br \/>\n        if [ -x &#8220;$PRGDIR\/tcruntime-ctl.sh&#8221; ]; then<br \/>\n                echo &#8220;Starting tcServer&#8221;<br \/>\n                \/bin\/su $TC_RUNTIME_USER $PRGDIR\/tcruntime-ctl.sh start<br \/>\n                RETVAL=$?<br \/>\n        else<br \/>\n                echo &#8220;Startup script $PRGDIR\/tcruntime-ctl.sh doesn&#8217;t exist or is not executable.&#8221;<br \/>\n                RETVAL=255<br \/>\n        fi<br \/>\n        echo &#8220;TEST: $PRGDIR : $TC_RUNTIME_USER : `ls -l $PRGDIR\/tcruntime-ctl.sh`&#8221; > \/tmp\/test.log<\/p>\n<p>}<\/p>\n<p>#setup<br \/>\nPRGDIR=&#8221;\/usr\/mware\/tcServerApps\/VEESQ01\/bin&#8221;<\/p>\n<p>case &#8220;$1&#8243; in<br \/>\n        start)<br \/>\n                start<br \/>\n                ;;<br \/>\n        stop)<br \/>\n                stop<br \/>\n                ;;<br \/>\n        restart)<br \/>\n                stop<br \/>\n                start<br \/>\n                ;;<br \/>\n        status)<br \/>\n                status<br \/>\n                ;;<br \/>\n        *)<br \/>\n                echo $&#8221;Usage: $0 {start|stop|restart|status}&#8221;<br \/>\n                exit 1<br \/>\n                ;;<br \/>\nesac<\/p>\n<p>exit $RETVAL<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ln -s \/usr\/\/tcServer\/APP\/bin\/init.d.sh \/etc\/init.d\/tc_APP \/sbin\/chkconfig &#8211;add tc_APP \/sbin\/chkconfig &#8211;level 2345 tc_APP on <\/p>\n<p>#!\/bin\/sh # # &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; # tc Runtime application server bootup script # # Copyright (c) 2009-2011 VMware, Inc. All rights reserved. # &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; # chkconfig: 2345 80 20 # description: Start up the tc Runtime application server # version: 2.9.2.RELEASE # build [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7124"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7124"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7124\/revisions"}],"predecessor-version":[{"id":7127,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7124\/revisions\/7127"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}