LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 01-31-2004, 01:48 PM   #1
vjenks
LQ Newbie
 
Registered: Jan 2004
Location: Great state of Idaho, USA
Distribution: SuSE 9.0 / Redhat 9.0
Posts: 4

Rep: Reputation: 0
Question adding a new daemon (service)


Ok, so I spent about a week farting around with my laptop (Toshiba Sat. 5205) and I *finally* got FnFx to work and I have control of my function keys, battery, etc.

Now, I'd *really* like to be able to set the fnfxd daemon to run on startup like all of the other services.

How would I do this? I'm using Fedora Core 1

Thanks!

-v
 
Old 01-31-2004, 01:51 PM   #2
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 45
hey.
i use debian. i think you would want to look at the equivalent of /etc/init.d and /etc/rc.d (i think that's what RH uses.)
 
Old 01-31-2004, 02:03 PM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
You can look for your rc.local file most likely and have it start from this file as well.
 
Old 02-11-2004, 07:31 PM   #4
zcatBrain
LQ Newbie
 
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
Hi,

I guess you want a script like the following. Copy/paste and simply save it as /etc/init.d/fnfx. Start the fnfx deamon by /etc/init.d/fnfx

Cheers,
t

#!/bin/bash
#
# fnfx This shell script takes care of starting/stopping Toshiba acpi key daemon fnfx
#
#
#
# processname: fnfxd
# config: /etc/fnfx/fnfxd.conf
#

# Source function library.
. /etc/rc.d/init.d/functions

prog="Toshiba fnfx"

start() {
# Start Toshiba ACPI Keys Daemon
echo -n $"Starting $prog: "
daemon /usr/local/sbin/fnfxd
touch /var/lock/subsys/fnfxd
echo
}

stop() {
# Stop service.
echo -n $"Shutting down $prog: "
killproc fnfxd
rm -f /var/lock/subsys/fnfxd
echo
}

# Check that fnfxd is up.

[ -f /usr/local/sbin/fnfxd ] || exit 0

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status fnfxd
;;
restart|reload)
stop
start
;;
condrestart)
[ -e /var/lock/subsys/fnfxd ] && (stop; start)
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
exit 1
esac

exit 0

Last edited by zcatBrain; 02-11-2004 at 07:33 PM.
 
  


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
start service - mail daemon Nishtya Linux - Newbie 0 04-24-2004 04:12 PM
How To Program Daemon(Service) Application wlmapp3 Programming 6 07-23-2003 03:58 PM
Service Monitoring Daemon (MON) PokerFace Programming 1 12-04-2002 11:31 AM
I want to start Snort as a service/daemon Olusegun Linux - Software 3 10-15-2002 10:35 AM
launching a programe in startup as service /daemon prpsarathy435 Linux - Software 6 07-07-2002 10:43 PM


All times are GMT -5. The time now is 07:07 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration