Find the answer to your Linux question:
Results 1 to 3 of 3
Why do we the user (or init at startup) use scripts with start and stop arguments to start and stop servers instead of starting or stopping it explicitly like we ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    11

    Why do server daemons use startup scripts?


    Why do we the user (or init at startup) use scripts with start and stop arguments to start and stop servers instead of starting or stopping it explicitly like we do normal programs?

    Also, whats a convenient way of finding out where the actual binary for a server is instead of just the startup script location?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,391
    To give the various init systems (sysVinit, upstart, systemd to name a few):
    - a unified way of starting/stopping daemons. The parameters to a init script are always the same
    - a unified way of reading startup configs (user/group, parameters)
    - a chance to start them according to the dependency hints (the comments on top of the scripts) and possibly in parallel

    For finding the binary: reading the init script is a possibilty, another is to list the content of the package
    rpm -qivl <PACKAGE> or dpkg -L <PACKAGE>
    You must always face the curtain with a bow.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,577
    You can find the location of a binary with the "whereis <name>" command.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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