LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2005, 02:09 PM   #1
keithieopia
Member
 
Registered: Feb 2005
Posts: 69

Rep: Reputation: 18
Startup Programs as a Service?


Ok I'm trying to make a program startup WITH linux like a service, but I have no idea how to go about this, I found something called cron but I really dont know if this would do it or even how to use it. Remember, I want the program as a service not to start up with a partiqular user.
 
Old 02-26-2005, 02:32 PM   #2
chris318
Member
 
Registered: Feb 2005
Distribution: Slack
Posts: 122

Rep: Reputation: 19
Question 1, what disto do you use. IMORTANT becuase I need to know what type of init scripts you use V or BSD.

You probably want to use inetd to startup your services not cron. Cron is not meant for what you are trying to do. It's meant to run a program at a specefic time. Like log rotation, sychronizing your clock, stuff like that. Inetd, is what your want to use. Inetd basically listens on all ports you tell it to and then when someone tries to connect to the port, lauches the appropraite service like httpd. Much more effecient then to have a buch of services running on your computer all the time, instead of just the one inetd.
 
Old 02-26-2005, 03:14 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
To make a program run as service you need a strating script for it. Look into /etc/rc?.d directories (or /etc/init.d, depending on the distribution). You need to prepare a similar one. There should be something called skel or something similar - example script where you usually need to only feel the program name.
 
Old 02-26-2005, 03:20 PM   #4
chris318
Member
 
Registered: Feb 2005
Distribution: Slack
Posts: 122

Rep: Reputation: 19
Also when your done you need to make the script executable... chmod 755 "scirpts_name"
 
Old 02-26-2005, 10:44 PM   #5
keithieopia
Member
 
Registered: Feb 2005
Posts: 69

Original Poster
Rep: Reputation: 18
Ok I'm using MEPIS (debian based), sounds like inetd is what I need, I'm trying to make abyss web server startup with linux. It listens on port 8000 but I have no Idea how to do all the aboved mentioned, and before someone jumps the gun switching to apache or another webserver is not an option. So is there a way to setup this inetd thing so it always listens on 8000 and executes the abyssws when someone connects?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Network service startup imurch01 Linux - Networking 6 01-16-2005 11:37 PM
startup the service automatically ashley75 Linux - General 4 09-24-2003 03:14 AM
how to interrupt service at startup mehlkelm Linux - General 9 05-03-2003 11:35 AM
Running a service at startup correro Linux - General 14 02-18-2003 08:00 PM
Stopping a startup service MrJoshua Linux - General 1 05-15-2002 03:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:33 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