Running an application everytime the server boots...
All, I was wondering where is the best place to put the command to start an application everytime the server starts (even if no one has logged into the system). I would need to do 3 things... 1) export DSMSERV_DIR=/opt/tivoli/tsm/server/bin 2) export DSMSERV_CONFIG=/opt/tivoli/tsm/server/bin/dsmserv.opt 3) run dsmserv Thanks for the help, Michael
On 2006-05-18 19:48:25 -0400 Michael Stempf
I was wondering where is the best place to put the command to start an application everytime the server starts (even if no one has logged into the system).
/etc/rc.d/boot.local -- printk("HPFS: Grrrr... Kernel memory corrupted ... going on, but it'll crash very soon :-(\n"); linux-2.4.3/fs/hpfs/super.c
On Thursday 18 May 2006 19:48, Michael Stempf wrote:
I was wondering where is the best place to put the command to start an application everytime the server starts (even if no one has logged into the system).
Hi Michael, Have a look at /etc/init.d/skeleton, which is a heavily commented script template designed to help you incorporate custom applications and services into the run level system. hth & regards, Carl
Suse defaults to auto logging in the default user that you set up when
installing. You can run an application from that user's ".profile". I've
done that for an amusement park POS system that's running live now. Works
fine. You can also use Yast to modify a user's login to be auto started at
boot time if you prefer.
Rick Schaeffer
----- Original Message -----
From: "Carl Hartung"
On Thursday 18 May 2006 19:48, Michael Stempf wrote:
I was wondering where is the best place to put the command to start an application everytime the server starts (even if no one has logged into the system).
Hi Michael,
Have a look at /etc/init.d/skeleton, which is a heavily commented script template designed to help you incorporate custom applications and services into the run level system.
hth & regards,
Carl
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On 18/05/06 18:24, Rick Schaeffer wrote:
Suse defaults to auto logging in the default user that you set up when installing. You can run an application from that user's ".profile". I've done that for an amusement park POS system that's running live now. Works fine. You can also use Yast to modify a user's login to be auto started at boot time if you prefer.
Rick Schaeffer It is generally regarded as not good policy to auto-login any user at startup, for obvious security reasons. There are, of course, exceptions, and a POS system would seem to be one of these. However, as a general rule, it is definitely not a good idea.
It is also not a good idea to start server-level processes in an ordinary user's startup; unless the process changes ownership (eg. postfix or xntpd), that user owns the process, and if he should ever log out, the process may be killed. Even if the process does attempt to change ownership, if it is owned by an ordinary user, that may not always be possible. What the OP wants to do is perfectly served by adding the necessary commands boot.local, or if dependent on being in a particular runlevel (eg. xntp) as a separate init script in /etc/init.d.
----- Original Message ----- From: "Carl Hartung"
To: Sent: Thursday, May 18, 2006 5:09 PM Subject: Re: [SLE] Running an application everytime the server boots... On Thursday 18 May 2006 19:48, Michael Stempf wrote:
I was wondering where is the best place to put the command to start an application everytime the server starts (even if no one has logged into the system).
Hi Michael,
Have a look at /etc/init.d/skeleton, which is a heavily commented script template designed to help you incorporate custom applications and services into the run level system.
hth & regards,
Carl
On 18/05/06 17:48, Michael Stempf wrote:
All,
I was wondering where is the best place to put the command to start an application everytime the server starts (even if no one has logged into the system).
I would need to do 3 things...
1) export DSMSERV_DIR=/opt/tivoli/tsm/server/bin
2) export DSMSERV_CONFIG=/opt/tivoli/tsm/server/bin/dsmserv.opt
3) run dsmserv
In addition to the boot.local and runlevel suggestions, there is also the crontab method: in /etc/crontab, add an entry like this: @reboot <username> <command> where <command> is the name of a script containing the above 3 commands. The process will be started as user <username>.
Wow - thanks everyone for all the ideas....now I just have to figure out
which one I will use...he he.
Thanks again!
Michael
On 5/18/06, Darryl Gregorash
On 18/05/06 17:48, Michael Stempf wrote:
All,
I was wondering where is the best place to put the command to start an application everytime the server starts (even if no one has logged into the system).
I would need to do 3 things...
1) export DSMSERV_DIR=/opt/tivoli/tsm/server/bin
2) export DSMSERV_CONFIG=/opt/tivoli/tsm/server/bin/dsmserv.opt
3) run dsmserv
In addition to the boot.local and runlevel suggestions, there is also the crontab method: in /etc/crontab, add an entry like this:
@reboot <username> <command>
where <command> is the name of a script containing the above 3 commands. The process will be started as user <username>.
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Thursday 18 May 2006 22:01, Michael Stempf wrote:
Wow - thanks everyone for all the ideas....now I just have to figure out which one I will use...he he.
Thanks again!
Michael
I vote for Darryl's third approach. Very elegant. But you're welcome, anyway! Carl
On Thursday 18 May 2006 22:01, Michael Stempf wrote:
Wow - thanks everyone for all the ideas....now I just have to figure out which one I will use...he he.
Thanks again!
Michael
I vote for Darryl's third approach. Very elegant. But you're welcome, anyway! Actually I use it only for a process that doesn't know how to change the
On 18/05/06 20:25, Carl Hartung wrote: process userid; otherwise, the boot scripts are probably preferable.
On Friday 19 May 2006 03:08, Darryl Gregorash wrote:
Actually I use it only for a process that doesn't know how to change the process userid; otherwise, the boot scripts are probably preferable.
That's how I'd probably stick to doing it... prudence and all that. But it sure is nice to have a straightforward, fast 'down and dirty' one or two line solution when all the other issues aren't a consideration! Carl
participants (5)
-
Carl Hartung
-
Charles Philip Chan
-
Darryl Gregorash
-
Michael Stempf
-
Rick Schaeffer