Yes, there's usually a
/etc/services or similar directory in which all of these files appear.
The usual command (varies for your distro) for starting, stopping and managing services is a command-file that you can actually read. (Just don't change anything.)
The
/etc/inittab file is the magic reference list that starts everything off. (See:
man init. Read about "runlevels.")
When you design your service, consider from the very beginning that you'd
like to have it run as a non-privileged (non-
root) user, and that it might be started by
xinetd, which listens to ports and starts services on-demand.
By all means,
study carefully the cornucopia of existing code. If you don't find exactly what you are looking for, you're sure to find something that's very close.
Quote:
Dictum ne agas - "do not do a thing already done."
Conservatum follicum - "the hair you save may be your own. (And you might wish to have it, someday.)"
|