permaculture playing cards*
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
Author

Top initscript

John Ahmadi
Greenhorn

Joined: Oct 24, 2005
Posts: 5
Hi,

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
==============================

#!/bin/bash
top
==========================
It's work but when I entered:

#!/bin/bash
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 " startWebLogic.sh" 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/startWebLogic.sh /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.


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Top initscript