Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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"
Distribution: OpenSUSE 11.1, Centos 5.3, Ubuntu Studio 8.04, 9.10
Posts: 9
Rep:
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.
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...
If you really want to, put it in root's .profile (or .bashrc), so it'll execute everytime you log in. Bad idea, though, since if you log it twice or more per day as root, you'll keep running multiple copies.
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...
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...
No idea what you're asking for, in terms of a "wrapper scrip which call my env file".
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.