werc-1.5.0-tweaks/bin/spawn-fcgi.sh
NunoSempere 01e571a21b feat: add spawn fcgi needed by systemd
I known, I know, I'm moving to alpine linux.
2022-03-10 22:53:39 +00:00

17 lines
277 B
Bash
Executable File

#!/usr/bin/bash
PID_file="/home/uriel/workspace/werc-1.5.0/bin/pid"
start() {
PID_spawn="$(/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -f /usr/sbin/fcgiwrap)"
echo "$PID_spawn" > "$PID_file"
}
stop() {
kill -15 "$(cat "$PID_FILE")"
}
case $1 in
start|stop) "$1" ;;
esac