Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
regards
christoph
On Thu, Jul 31, 2008 at 02:05:39PM +0200, Christoph Höger wrote:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
Most "binaries" (if by that you mean executable programs) don't really need an "init script", they just run. Enter the executable name on the command line and the program springs into life.
Or am I musinderstanding you completely? :-)
Am Donnerstag, den 31.07.2008, 13:19 +0100 schrieb Chris G:
On Thu, Jul 31, 2008 at 02:05:39PM +0200, Christoph Höger wrote:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
Most "binaries" (if by that you mean executable programs) don't really need an "init script", they just run. Enter the executable name on the command line and the program springs into life.
Or am I musinderstanding you completely? :-)
-- Chris Green
Yes, you do ;) , I need the binary to start when the machine boots up.
Am Donnerstag, den 31.07.2008, 13:30 +0100 schrieb Marcelo M. Garcia:
Hi
Why don't you start with one in /etc/init.d and modify to you needs?
Marcelo
Christoph Höger wrote:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
regards
christoph
That has some bad taste. I _could_ do that but I would always feel like missing something important.
On Thu, Jul 31, 2008 at 02:31:06PM +0200, Christoph Höger wrote:
Am Donnerstag, den 31.07.2008, 13:19 +0100 schrieb Chris G:
On Thu, Jul 31, 2008 at 02:05:39PM +0200, Christoph Höger wrote:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
Most "binaries" (if by that you mean executable programs) don't really need an "init script", they just run. Enter the executable name on the command line and the program springs into life.
Or am I musinderstanding you completely? :-)
-- Chris Green
Yes, you do ;) , I need the binary to start when the machine boots up.
In that case you just add the line to run it (i.e. the name of the executable, possibly with its full path) to /etc/rc.d/rc.local. That's exactly what rc.local is for.
If you want the whole 'start x' 'stop x' thing then just copy one of the existing init scripts (as suggested by someone else).
2008/7/31 Christoph Höger choeger@cs.tu-berlin.de:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
Take a look in /usr/share/doc/initscripts-*/sysvinitfiles
John
Hi
Why don't you start with one in /etc/init.d and
modify to you needs?
Marcelo
Christoph Höger wrote:
Hi,
is there some documentation out there about how
to write a init script
for fedora9 for a given binary? Maybe even a "insert your binary
here"-tempate?
regards
christoph
That has some bad taste. I _could_ do that but I would always feel like missing something important. --
You don't say if you have shell programming experience. Those who do, have an easier time with it. Simply 'study' the existing init scripts and jump in with your own, or modify an existing one (surely nothing illegal here :). Also check out the man page for chkconfig, to see how that works in Linux init scripts. Also try this... go to Google and search on "tutorial init script for Linux"... for which a wealth of info was returned. -- Nix
Why don't you start with one in /etc/init.d and modify to you needs?
I've done that myself a couple of times, and I can never seem to get it to act exactly like the script I started with. It always seems to echo an extra blank line or the [status] doesn't come out at the end of the line or with the right color or something else looks screwy and non-compatible with the output it generates.
I'd be very curious to see some documentation for init script conventions to follow to get all these nit-picky details to come out right.
On Thu, 31 Jul 2008 14:05:39 +0200, Christoph Höger wrote:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
/usr/share/rpmdevtools/template.init
and probably a few hints in the Fedora Wiki (Packaging pages).
On Thu, 2008-07-31 at 14:05 +0200, Christoph Höger wrote:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
regards
christoph
Do you mean a /etc/init.d script. It is pretty straightforward if you look at one of then. Pick a short one. The thing that makes it special is the # chkconfig: 2345 55 25 type line at the beginning which controls the levels at which the script is called and the order it is started and killed.
In this case it is started at level 2345 and 55 is the order of starting and 25 the order of being killed. -- ======================================================================= It is necessary to have purpose. -- Alice #1, "I, Mudd", stardate 4513.3 ======================================================================= Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@sbcglobal.net
On Thu, Jul 31, 2008 at 10:55:09AM -0500, Aaron Konstam wrote:
On Thu, 2008-07-31 at 14:05 +0200, Christoph Höger wrote:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
regards
christoph
Do you mean a /etc/init.d script. It is pretty straightforward if you look at one of then. Pick a short one. The thing that makes it special is the # chkconfig: 2345 55 25 type line at the beginning which controls the levels at which the script is called and the order it is started and killed.
In this case it is started at level 2345 and 55 is the order of starting and 25 the order of being killed. --
Is there an init script for privoxy?
Thanks.
On Thu, Jul 31, 2008 at 02:05:39PM +0200, Christoph Höger wrote:
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
Indeed there is with even LSB support and lots of docs:
http://fedoraproject.org/wiki/Packaging/SysVInitScript
Consider this the most authoritative Fedora source of information. :) -- Axel.Thimm at ATrpms.net
On Thu, 2008-07-31 at 11:44 -0400, Dave Feustel wrote:
On Thu, Jul 31, 2008 at 10:55:09AM -0500, Aaron Konstam wrote:
On Thu, 2008-07-31 at 14:05 +0200, Christoph Höger wrote:
Hi,
is there some documentation out there about how to write a init script for fedora9 for a given binary? Maybe even a "insert your binary here"-tempate?
regards
christoph
Do you mean a /etc/init.d script. It is pretty straightforward if you look at one of then. Pick a short one. The thing that makes it special is the # chkconfig: 2345 55 25 type line at the beginning which controls the levels at which the script is called and the order it is started and killed.
In this case it is started at level 2345 and 55 is the order of starting and 25 the order of being killed. --
Is there an init script for privoxy?
Thanks.
No. -- ======================================================================= The economy depends about as much on economists as the weather does on weather forecasters. -- Jean-Paul Kauffmann ======================================================================= Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@sbcglobal.net