FreeBSD rc.d FastCGI Script

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
#
# signet.sh for rc.d usage (c) 2008 David Blewett.
# $Id$

# PROVIDE: signet
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable signet:
#
#  signet_enable="YES"
#  # optional
#  signet_flags="maxchildren=5 minspare=1 maxspare=2 socket=/tmp/signet-fcgi.sock"
#  signet_data="/usr/local/www/signet"
. "/etc/rc.subr"

# Set some defaults
signet_enable=${signet_enable:-"NO"}
signet_flags=${signet_flags:-"maxchildren=5 minspare=1 maxspare=2 socket=/tmp/signet-fcgi.sock"}
signet_data=${signet_data:-"/usr/local/www/signet"}
signet_user=${signet_user:-"svn"}

name=signet
rcvar=`set_rcvar`
load_rc_config $name
pidfile="/var/run/${name}.pid"
command=/usr/local/www/signet/manage.py
command_interpreter="python"
command_args="runfcgi workdir=$signet_data pidfile=$pidfile daemonize=true"

start_cmd="echo \"Starting ${name}.\"; su ${signet_user} -c \"${command} ${command_args} ${signet_flags}\""

run_rc_command "$1"

More like this

  1. Run Django as a FastCGI authorizer by cme 5 years, 6 months ago
  2. OpenSolaris SMF Django Daemon Script by davidblewett 4 years, 9 months ago
  3. Simple FastCGI authorizer view by cme 5 years, 6 months ago
  4. djangopath: conveniently set sys.path and DJANGO_SETTINGS_MODULE by alia_khouri 5 years, 8 months ago
  5. ifsecure by kyprizel 6 years, 4 months ago

Comments

(Forgotten your password?)