Skip to content

Instantly share code, notes, and snippets.

@fdelbos
Created February 15, 2012 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fdelbos/1836947 to your computer and use it in GitHub Desktop.
Save fdelbos/1836947 to your computer and use it in GitHub Desktop.
FreeBSD startup script for uWsgi
#!/bin/sh
#
# PROVIDE: myuwsgi
#
. /etc/rc.subr
name=myuwsgi
rcvar=myuwsgi_enable
start_cmd="myuwsgi_start"
stop_cmd=":"
load_rc_config $name
myuwsgi_start()
{
if checkyesno myuwsgi_enable; then
/usr/local/bin/uwsgi \
--uid 1001 --threads 10 --workers 1 --harakiri 30 \
--daemonize /var/log/lecomptoir.cz.uwsgi.log \
--xml /home/fred/www/lecomptoir/uwsgi.xml
fi
}
run_rc_command $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment