Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rc-update question . . .
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
GoofballJM1
Guru
Guru


Joined: 22 Mar 2004
Posts: 392
Location: Denver, CO USA

PostPosted: Tue Mar 30, 2004 4:44 am    Post subject: rc-update question . . . Reply with quote

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. :idea:
Back to top
View user's profile Send private message
ewan.paton
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1219
Location: glasgow, scotland

PostPosted: Tue Mar 30, 2004 4:52 am    Post subject: Reply with quote

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
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Tue Mar 30, 2004 11:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum