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:
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:
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.