werc-1.5.0-tweaks

Tweaks for the werc website builder created by the mad architect Uriel
Log | Files | Refs | README

spawn-fcgi (424B)


      1 #!/sbin/openrc-run
      2 ## move to /etc/init.d/spawn-fcgi2
      3 ## Then sudo rc-update add spawn-fcgi2
      4 ## test with sudo rc-service spawn-fcgi2 start
      5 ## and sudo rc-service spawn-fcgi2 stop
      6 PID_file="/var/tmp/spawn"
      7 
      8 depend() {
      9   need net
     10 }
     11 
     12 start() {
     13   /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -f /usr/bin/fcgiwrap -P "$PID_file"
     14 }
     15 
     16 stop() {
     17   kill -15 "$(cat "$PID_file")"
     18   rm "$PID_file"
     19 }
     20 
     21 case $1 in
     22   start|stop) "$1" ;;
     23 esac
     24