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 and i must execute everytime to start the app.

How can i achieve this?

Any help is appreciated. :)



Recommended Answers

All 3 Replies

Now, it has a scrip 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.

Thx..joe i will try it...

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:


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.