LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-20-2003, 04:33 PM   #1
atlesn
Member
 
Registered: Oct 2003
Location: Oslo, Norway
Distribution: RedHat 9.0, Fedora Core 1/2/3, Debian 3.0, Smoothwall
Posts: 110

Rep: Reputation: 15
Adding new service to a runlevel.


Hi all!

I downloaded a webserver (Abyss), because I'm to stupid to use apache. But I'm having some difficulties running it as a daemon automatticly at boot-time. When i just run "abyssws -d" at the prompt however, it works fine.

How do you add new services into a runlevel in debian 3.0 (should be the same in other dists.)?
 
Old 12-20-2003, 04:52 PM   #2
miaviator278
Member
 
Registered: Dec 2003
Location: Al-Diwania, Iraq (deployed)
Distribution: Slackware ONLY
Posts: 237

Rep: Reputation: 30
man init
man rc.d

not sure if rc.d is a manpage?

there is a set of folders or scripts in your /etc directory problably in rc.d each should be an rc.x script, they run all nessacary services for a certain runlevel, if you add a script to run abyssws to your init 3 multiuser runlevel it will start at boot.
 
Old 12-20-2003, 04:59 PM   #3
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
since you're running redhat, you'll also want to check out:

man chkconfig
and
man service

Hopefully this is a good start for you.
 
Old 12-20-2003, 05:01 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Find out the runlevel you'd like to run the service on (to list your current one, use teh command 'runlevel') and look into /etc/. Inside (among ither things) you have drectories like rcX.d/ where X is the runlevel. Inside every directory you have symlinks to starting scripts (script names are SXXsomething; they're run in the order of XX). What you need to do is write such a script. To make things easier, there's /etc/init.d/skeleton. It's a file you fill with the right commands to run and stop the service and the script is ready. Very simple example:
Code:
NAME=progname
case "$1" in
  start)
        echo -n "Starting $NAME"
        command_to_start
        echo "."
        ;;
  stop)
        echo -n "Stopping $NAME "
        command_to_stop
        echo "."
        ;;
esac
exit 0
 
Old 12-20-2003, 05:09 PM   #5
atlesn
Member
 
Registered: Oct 2003
Location: Oslo, Norway
Distribution: RedHat 9.0, Fedora Core 1/2/3, Debian 3.0, Smoothwall
Posts: 110

Original Poster
Rep: Reputation: 15
That simple!?
Thx for your hlp!
 
Old 06-06-2004, 04:56 PM   #6
kater0000
Member
 
Registered: Aug 2003
Distribution: Gentoo
Posts: 43

Rep: Reputation: 15
i want to do exactly the same, but my only problem is that i am not running smoothwall express, i tried to use the same script, and i put it in /etc/rc.d/init.d, but abyss did not start? is it me or is it smoothwall ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a Service in inetd Icky_Joe Linux - Newbie 4 04-26-2005 09:05 AM
Adding new xinetd service Aldric Linux - Networking 1 06-03-2004 11:40 AM
adding a window manager, using runlevel 3 spork545 Slackware 3 01-16-2004 09:35 AM
adding a service neverender Mandriva 4 01-14-2004 06:25 AM
Adding Service RedHat 9 green123 Linux - Newbie 4 08-26-2003 01:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration