feat: add spawn fcgi needed by systemd
I known, I know, I'm moving to alpine linux.
This commit is contained in:
parent
0ad44f3a41
commit
01e571a21b
3
.gitignore
vendored
Normal file → Executable file
3
.gitignore
vendored
Normal file → Executable file
|
@ -13,4 +13,5 @@
|
||||||
|
|
||||||
!/sites/CREATE-SITE-DIRECTORIES-HERE
|
!/sites/CREATE-SITE-DIRECTORIES-HERE
|
||||||
|
|
||||||
|
## pid artifact files
|
||||||
|
**/pid
|
||||||
|
|
16
bin/spawn-fcgi.sh
Executable file
16
bin/spawn-fcgi.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user