1

Is there an easy way to create a FreeBSD rc script?

view story
linux-howto

http://unix.stackexchange.com – I have a FreeBSD jail in which I run a server using the command: /usr/sbin/daemon /path/to/script.py At the moment I have to run this command every time I restart the machine and the jail starts. I'd like to have this command started from /etc/rc. Is there an easy way to create a FreeBSD rc script for a daemon command? UPDATE: I read through this BSD documentation about rc scripts, and from that I created the following script in /etc/rc.d/pytivo: #!/bin/sh . /etc/rc.subr name=pytivo rcvar=pytivo_enable procname="/usr/local/pytivo/pyTivo.py" command="/usr/sbin/daemon -u jnet $procname (HowTos)