Start background process. How? - Suse

This is a discussion on Start background process. How? - Suse ; What is the most compatible way I can arrange to automatically run a program every time my SUSE 10.3 based server boots? Ideally it should run at the end of the boot process after the network stuff has finished initialising. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Start background process. How?

  1. Start background process. How?

    What is the most compatible way I can arrange to automatically run a program
    every time my SUSE 10.3 based server boots? Ideally it should run at the
    end of the boot process after the network stuff has finished initialising.

    --

    Brian Gregory. (In the UK)
    ng@bgdsv.co.uk
    To email me remove the letter vee.



  2. Re: Start background process. How?

    Brian Gregory [UK] wrote:
    >
    >
    > What is the most compatible way I can arrange to automatically run a program
    > every time my SUSE 10.3 based server boots? Ideally it should run at the
    > end of the boot process after the network stuff has finished initialising.


    Become root and do:
    ln -s /path/to/myscript /etc/rc.d/rc5.d/S99myscript

    Do this for each level you want this (e.g. rc3.d for init 3)

    More info in /etc/init.d/README on how to do it correctly, because the
    way above is the poor mans version. :-D

    houghi
    --
    houghi http://houghi.org http://www.plainfaqs.org/linux/
    http://www.netmeister.org/news/learn2quote.html
    >
    > Today I went outside. My pupils have never been tinier...


  3. Re: Start background process. How?

    Hi Brian

    A couple of choices.

    - Create your own boot script that is compatible with all those in
    /etc/rc.d then plug it into the right runlevel. This has gotten a bit
    complicated since 9.x though as you need to allow for concurrency. I
    dont remember the utility you have to run to insert it nowadays. Some
    reading needed! I think I saw a readme in the runlevel directory
    sructure. (You could also obviously hack an existing script to launch
    your app, but beware of YAST updates)

    - If it can run from /etc/rc.d/boot.local then just modify that script
    with your requirements. Keep in mind that this is prior to network start.

    - A repetitive cron job/script that checks for the presence of a flag or
    pid file. ie it wont run if it is present but the flag is deleted by
    /etc/rc.d/boot.local.

    - You can run it from /etc/inittab. I have never tried this but it
    apparently works.

    - You can launch a users login that auto starts the app from their
    ..bashrc file or /etc/passwd shell definition. I use the .bashrc to
    launch a Xorg/Firefox thing after the user uses the CLI to login. (No
    window or desktop manager - surveillance system)

    Even though it takes some learning I would recommend the rc.d/init
    approach.

    Cheers Bob



    Brian Gregory [UK] wrote:
    > What is the most compatible way I can arrange to automatically run a program
    > every time my SUSE 10.3 based server boots? Ideally it should run at the
    > end of the boot process after the network stuff has finished initialising.
    >


+ Reply to Thread