Hello,
I have a applicaton folder in /home/ which start with run.sh.
In run.sh, there are some export commandline.
I want to auto start run.sh when my server system start and restart.
How can I do it?
I created file on /etc/rc.d/init.d.
Then run chkconfig --add, chkconfig on command.
But when I restart system, it doesn't working.
Thanks in advice.
How to autorun sh file
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: How to autorun sh file
What are you really trying to run?
Exports from an init.d service are not available to users, and init.d tasks have a structure that must be followed.
Exports from an init.d service are not available to users, and init.d tasks have a structure that must be followed.
Re: How to autorun sh file
My difficult is export commandline.
When I used export command line in shell,
I can't check it on command line.
How can I check it?
When I used export command line in shell,
I can't check it on command line.
How can I check it?
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: How to autorun sh file
When you export a variable in a shell script, the variable is local to the script, and disappears when the script exits.
Please explain what you are really trying to run, instead of being vague and secretive.
Please explain what you are really trying to run, instead of being vague and secretive.