commit 0ad44f3a41fcf28f59ceb6ba293d9ff5901ea744 parent e6e1bb3b594f47d6b37b8da879f5997653c15bf1 Author: NunoSempere <nuno.sempere@protonmail.com> Date: Thu, 10 Mar 2022 21:19:30 +0000 hack: add spawn-cgi script, necessary for systemd on ubuntu I know, I know, I'm moving to Alpine Linux. Diffstat:
| M | bin/contrib/discount.rc | | | 0 | |
| A | bin/contrib/spawn-fcgi.sh | | | 16 | ++++++++++++++++ |
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/bin/contrib/discount.rc b/bin/contrib/discount.rc diff --git a/bin/contrib/spawn-fcgi.sh b/bin/contrib/spawn-fcgi.sh @@ -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 + +