>> I'm new to starpy and fastagi (and asterisk, and python!) and have
>> been working on a fastagi script using the starpy library. I am
>> having a bit of trouble implementing a initialization script for
>> bootup, so that the daemon loads when my machine boots, and asterisk
>> starts up. Presumably this is the way most systems running the
>> asterisk+localhost_fastagi setup are put together, so I'm wondering if
>> there are any specific examples of init.d scripts (I'm running debian
> You can simply put the command line to start your fastagi daemon
> in /etc/rc.local, or you can write a little init script like this
> example and put it in /etc/init.d, and also do an update-rc.d ( look
> at the man ) to enable it on boot.
Yes, there's basically nothing special about starpy scripts this way.
They do not (generally) need to be loaded after asterisk, unless they
are trying to open an ami connection immediately. They can simply be
started and when asterisk loads it will forward calls to the fastagi
port that's already open and waiting.
On FreeBSD you can add the script to your /etc/rc.local . On Gentoo you
add them to /etc/conf.d/local.start .
echo "Starting My Cool Application"
su -u username -c "/full/path/to/python /full/path/to/script &"
Mike C. Fletcher
Designer, VR Plumber, Coder