I have a python program which I wrote and would like to run on startup in FreeBSD 7.1.
For my current installation, the script lives at
/home/devuser/project/trunk/src/proj. At the beginning of my
proj I have added (for testing)
os.system("echo 'proj STARTED' >> /tmp/projlog")
In /usr/local/etc/rc.d/ I have 'proj' which contains:
#!/bin/sh # PROVIDE: proj # REQUIRE: DAEMON LOGIN # KEYWORD: shutdown . "/etc/rc.subr" $location="/home/devuser/project/trunk/src" name="proj" rcvar=`set_rcvar` command="$location/$name" command_args="$1" command_interpreter="python" load_rc_config $name echo "trying to run proj" >> /tmp/rclog run_rc_command "$1"
In my rc.conf:
If I run
/usr/local/etc/rc.d/proj <start|stop|status> as
root everything works as expected -
trying to run proj appears in
proj STARTED appears in
On system startup, I get
trying to run proj in
/tmp/rclog, but nothing in
/tmp/projlog - python isn't being started.
Why is the rc script running but failing to actually invoke Python, and not giving me any feedback?