using rc scripts



I wrote an rc script for cfengine, but it's not recording the pid. Am
I doing something obviously wrong, or does rc rely on the app to
provide the pid?
--
#!/bin/sh
#
# PROVIDE: cfexecd
# REQUIRE: LOGIN
# BEFORE: securelevel
# KEYWORD: FreeBSD shutdown

. "/etc/rc.subr"

name="cfexecd"
rcvar=`set_rcvar`

command="/usr/local/sbin/cfexecd"
command_args=""
pidfile="/var/run/$name.pid"
#required_files="/usr/local/etc/$name.conf"

# read configuration and set defaults
load_rc_config "$name"
: ${cfexecd_enable="NO"}
: ${cfexecd_flags=""}

run_rc_command "$1"


--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Closing a program with script...
    ... Switching to that PID and using Alt+F4 ... Say you have two instances of an app like Word open. ... The script generates no errors ... Tried it in a command window, also, with no ...
    (microsoft.public.windowsxp.general)
  • Re: Closing a program with script...
    ... Using Process Explorer to see the PID, ... but it still requires that the script ... would need to be dealt with: Say you have two instances of an app like ... I get a command window flashing by, ...
    (microsoft.public.windowsxp.general)
  • Re: [BENCHMARK] nproc: netlink access to /proc information
    ... what guarantee is there that the notification ... keep supplying differential ... >> that the app doesn't consume excessive amounts of cpu. ... While "pid" makes a nice extreme example, ...
    (Linux-Kernel)
  • Re: How to determine if an app/process has terminated?
    ... > I am using SysTools StSpawnApplication which returns the App Handle ... > but for DAP it immediately triggers the OnComplete event. ... > does not correspond with the PID in the Process ... There might be a solution in hooking calls to CreateProcess. ...
    (comp.lang.pascal.delphi.misc)
  • finding pids with open file descriptors on an inode
    ... I would like to write an app that simply prints ... the pid of the process that is attached to the ... I can do this by searching through ... /proc for a process who's stdout shares the inode ...
    (comp.os.linux.development.apps)