Execution of a script -Urgent help needed??
I have installed Apache in my Linux5.1 machine.I have root access in that.I have also installed siteminder in that.Now everytime when i restart the apache its unable to load a env file from siteminder.Then i need to execute a script seperatly.What i need is to execute a script ". ./nete_wa_env.sh" evrytime when i login as "root"
Can somebody help me on it... |
When you login, a .bashrc or a profile style .bashrc file is called in the default bash shell. If your shell script sets up environment variables, you can add these to the root profile for startup. This is typically located in the /root/.bashrc file or you may try adding the shell script to the /etc/profile.d/ directory.
|
Quote:
A better thing to do, would be to put it at the bottom of the apache startup script, so it'll run whenever Apache is restarted.... |
Is it advisable to have a wrapper scrip which call my env file along with the startup script of apache.If so can you please give me the syntax or command to create one...
|
Quote:
In your first post, you said you already HAVE a shell script, that needs to be run, after you start up Apache. As I suggested, why don't you just put that same script file, in the Apache startup script???? Open the /etc/init.d/apache2 file, find the start routine, and put a call in there to run your shell script. That's it. |
All times are GMT -5. The time now is 01:24 AM. |