View previous topic :: View next topic |
Author |
Message |
GoofballJM1 Guru
Joined: 22 Mar 2004 Posts: 392 Location: Denver, CO USA
|
Posted: Tue Mar 30, 2004 4:44 am Post subject: rc-update question . . . |
|
|
I have a question for all of you much more experienced gentoo users. I am setting up a streaming audio server (shoutcast or darwin, I haven't decided yet) on my gentoo system, and I would like to have the server software run at the bootup time, so i don't have to manually start in in the rare case I should have need to reboot the system. something like this maybe:
Code: |
rc-update add <program> default
|
the shoutcast server for *nix systems doesn't require any compiling whatsoever. I just untar the file and run the program basically, after editing the config file. What needs to be done? I am assuming this is possible. Correct me if I am wrong. |
|
Back to top |
|
|
ewan.paton Veteran
Joined: 29 Jul 2003 Posts: 1219 Location: glasgow, scotland
|
Posted: Tue Mar 30, 2004 4:52 am Post subject: |
|
|
if someone writes an ebuild for it then it should create an entry in /etc/init.d/ for you but if you look at the packages in there already you will see its basicly just the start and stop commands
eg Code: | depend() {
need net logger
}
start() {
ebegin "Starting webmin"
/etc/webmin/start
eend $?
}
stop() {
ebegin "Stopping webmin"
/etc/webmin/stop
eend $?
}
|
_________________ Giay tay nam | Giay nam cao cap | Giay luoi |
|
Back to top |
|
|
ecatmur Advocate
Joined: 20 Oct 2003 Posts: 3595 Location: Edinburgh
|
Posted: Tue Mar 30, 2004 11:05 am Post subject: |
|
|
You can also add commands to /etc/conf.d/local.{start,stop}: Code: | # /etc/conf.d/local.start:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/local.start,v 1.4 2002/11/18 19:39:22 azarah Exp $
# This is a good place to load any misc.
# programs on startup ( 1>&2 )
|
1>&2 means to put 1>&2 after the command, to redirect any output into the error stream; this is necessary if you need to see the output, so it will get logged. |
|
Back to top |
|
|
|