I've made a shell script for this purpose :
--- CODE ---
#!/bin/sh
PROJDIR="/home/ivica/devel/webapp/info"
PIDFILE="$PROJDIR/run/info.pid"
SOCKET="$PROJDIR/run/info.socket"
PYTHON="/home/ivica/bin/python"
LIGHTTPD="/home/ivica/lighttpd/sbin/lighttpd"
LIGHTTPD_CONF="/home/ivica/etc/lighttpd.conf"
MAXSPARE=5
MINSPARE=3
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/ivica/lib/"
export PATH="$PATH:/home/ivica/bin"
case "$1" in
start)
echo "Starting the infoservice application"
if [ -f $PIDFILE ]; then
echo "Info application already started"
exit
fi
$LIGHTTPD -f $LIGHTTPD_CONF
$PYTHON $PROJDIR/manage.py runfcgi socket=$SOCKET
pidfile=$PIDFILE method=threaded maxspare=$MAXSPARE minspare=$MINSPARE
;;
stop)
echo "Stoping the infoservice application"
if [ -f $PIDFILE ]; then
kill `cat -- $PIDFILE`
rm -f -- $PIDFILE
fi
#kill lighttpd process
for i in $( pidof lighttpd ); do
kill -9 $i
done
;;
restart)
if [ -f $PIDFILE ]; then
$0 stop
$0 start
else
$0 start
fi
;;
status)
if [ -f $PIDFILE ]; then
PID=`cat $PIDFILE`
echo "django apllication is running. (PID: $PID)"
echo "lighttpd is running. (PID: $( pidof lighttpd ))"
else
echo "django application is not running."
echo "lighttpd is not running."
fi
;;
*)
echo "Usage: infoctl [start|stop|restart|status]"
esac
--- END CODE ---
imbunche wrote:
> Hi all,
>
> I finnally settled on lighttpd + django runfastcgi as my devel
> environment.
> It's just wonderful mainly becausse I run the httpd server as myself,
> no need root permissions or anything .... and fastcgi is the only thing
> I get from my ISP.
>
> But how can I force a server reload when I change my code???
>
> thanks for your help,
> IvO
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---