Find the answer to your Linux question:
Results 1 to 2 of 2
EDIT: Apparently the LSB System Init is what I was looking for. Hi, I've been developing an application (daemon) for a while, but there is some trouble with starting up ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    Cross-distro daemon startup

    EDIT: Apparently the LSB System Init is what I was looking for.

    Hi,

    I've been developing an application (daemon) for a while, but there is some trouble with starting up the service on different distros.

    I've used a Debian skeleton script (found in /etc/init.d/skeleton on Ubuntu). The script uses start-stop-daemon to take care of starting, stopping, and restarting the daemon. I've since gotten feedback from a Mandriva user who was unable to use this script because, apparently, Mandriva lacks start-stop-daemon.

    Is there a more generic way to do this? Is there a ready script somewhere I can use so I don't have to recode the functionality of start-stop-daemon?

    Alternatively, are there a few programs that have the same functionality so I can add checks to my configure.ac to take care of the most common setups?

    Thanks,
    daou

  2. #2
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2
    I was looking more at what calls were needed to start and stop the daemon that are distribution-independent. The LSB listed the functions (start_daemon and killproc). I think I've successfully implemented it, with a few important modifications to the daemon itself.

    btw, do you know if it's safe to use log_end_msg, log_begin_msg and log_daemon_msg? These are not listed in Linux Standard Base Core Specification 3.1 (although they are implemented in Ubuntu's /lib/lsb/init_functions, for example). I ended up using only log_success_msg and log_failure_msg and echoes for output and logging, which are explicitly specified in the specification.
    Last edited by oz; 06-20-2011 at 12:00 AM. Reason: spam removal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...