0

Dear Users

This might seem strange but i need to check this out. After all thats what linux is all about.

I have an application called OPMANAGER which is a network monitoring software and works well in linux.

Now, this appl uses JAVA, MYSQL and APACHE services. After the process starts it will automatically open a web browser like http://localhost:9090 the port where it is running and i wuld be able to go to the UI and monitor my devices and stuff.

Now, wht i want to do " from the terminal if i type 'opmanager' , it must automatically open the opmanager UI ( webpage ) if the app is running. If it is not running then, it it shoud automatically start the app and open up the webpage. "

Now, it has a scrip startopmanagerserver.sh and i must execute everytime to start the app.

How can i achieve this?

Any help is appreciated. :)

Thanks

VJ

2
Contributors
3
Replies
4
Views
11 Years
Discussion Span
Last Post by vijayshankar
0

Now, it has a scrip startopmanagerserver.sh and i must execute everytime to start the app.

To do this, you must edit the startup file in Linux. This varies from distro to distro, so I can't quite remember. It should be located (or a reference of it) in something like /etc/init.d. Try opening some of the files, and you will probably find the right one eventually. Add the path of the script to it, and it will start with root permissions.

0

Hey Joe

cant we try something like this.

Instead of putting this under init.d, why not create an alias under .bashrc
and check for the processes, httpd, java and mysqld and if these processes are runnin we can confirm tht the app is running and directly invoke the webbrowser to connect to ipaddress:portnumber and if these processes are not runnin, we can run the script in nohup process and then try to invoke the browser with ipadd:port number.

I am not sure but will this work? ? ? ? :confused:


VJ

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.