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 08:33 PM.
|