File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Top initscript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Top initscript" Watch "Top initscript" New topic

Top initscript

John Ahmadi

Joined: Oct 24, 2005
Posts: 5

Howcan I write an script which has start/stop/status option including a program for example " Top" where I start as background process.

I tried this

It's work but when I entered:

top &

I got this error:

./test: line 3: top & : command not found

Overall my main question is how can I write script . I've an script for weblogic as "" and I copied the script to /etc/init.d
and /etc/rc3.d and made an symbolic link like:

code:ln-s /opt/bea/domains/admin/ /etc/rc3.d/S90startWeblogic

but the problem is that I don't know how can I stop the program or restart it again.command kill it's not suitable to do that.
any help?
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

It depends on how to stop the things, your script is starting.

Perhaps you find a script /etc/init.d/skeleton, which is a skeleton for building start-stop-restart-... - Scripts.

But I guess you're not the first one, who needs a start-stop-script for Weblogic, so there should be a usable script to be found in the net.
I agree. Here's the link:
subject: Top initscript
It's not a secret anymore!