PDA

View Full Version : restart tsc (java) on linux?



N.V.M.
03-16-2005, 10:46 PM
how do i do that? i see the control panel with about a dozen executables, but have no idea how to get'er going again.

MerePeer
03-17-2005, 07:01 AM
Even though it is TSC, you run the D2OL image. Depending on where you installed it, would be something like

cd /var/opt/CommunityTSC/TSC
./D2OL

I made a /etc/init.d (Debian based) file and set it up to run at boot. In case you are interested, here it is. I can now use /etc/init.d/u_tsc start (or stop).
Note: your PATH needs java in it, or a symbolic link to where java is.

# cat /etc/init.d/u_tsc
set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/var/opt/CommunityTSC/TSC/D2OL
NAME=u_tsc
DESC="u_tsc"

PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
DIRNAME=/var/opt/CommunityTSC/TSC

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

case "$1" in
start)
echo -n "Starting $DESC: $NAME"
cd $DIRNAME
nice $DAEMON controller:file &
echo "."
;;

stop)
echo -n "Stopping $DESC: $NAME"
sed -e 's/Shutdown=false/Shutdown=true/' $DIRNAME/control.prp > $DIRNAME/control.prp_temp; mv -f $DIRNAME/control.prp_temp $DIRNAME/control.prp
echo "."
;;

*)
echo "Usage: $SCRIPTNAME {start|stop}" >&2
exit 1
;;
esac

exit 0

Bok
03-17-2005, 07:39 AM
If you want to get rid of all the java processes it has potentially spawned just use either

killall java

or

kill -9 `ps -ef|grep java |grep -v grep | awk {'print $2'}`

from memory , can't test right now, I may have the {' the wrong way round...

Bok

N.V.M.
03-17-2005, 09:11 PM
thanks for the responses...:cool: