Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

Monday, May 13, 2013

Java application as a daemon - initd start/stop template file

Your Java application is a daemon and you want to stop it more gracefully than "killall java".

The example below is what you need:

Friday, August 12, 2011

MS DOS batch tips

So, by way of tribute to the dying art of the DOS Batch file, I present my top ten batch file tricks:

1 Use PUSHD / POPD to change directories
Read Scott Hanselman's writeup on PUSHD. The basic idea is that it keeps a stack, so at the simplest level you can do something like this:

PUSHD "C:\Working Directory\" ::DO SOME WORK POPD

That allows you to call the batch file from any directory and return to the original directory when you're done. The cool thing is that PUSHD can be nested, so you can move all over the place within your scripts and just POPD your way out when you're done.