Artifact b616e6dbbda6a621b023b159d24826292e77009a93553a31537159eed382e621:
- Executable file tools/fslsrv — part of check-in [1cbcb38cc9] at 2022-10-07 22:15:16 on branch trunk — Assorted updates surrounding my fslsrv wrapper: * Reflected improvements from the tangentsoft.com version into this simpler alternative. Although we don't generally recommend use of this script any more, preferring systemd to get autostart on boot and autorestart on crash, www/server/any/none.md still refers to this script, and it feels like a regression to remove it. If someone is interested in simple-as-possible SCGI service, fslsrv is a fit companion. * Removed direct reference to fslsrv from www/server/debian/service.md since the indirect reference via the SCGI doc suffices. * The full-strength nginx doc now refers to both of these fslsrv variants in a handwavy way, since it's outside the scope of that doc to care how you get your background SCGI servers running. (user: wyoung size: 1224) [more...]
#!/bin/bash FOSSIL=fossil PGARGS="-P 1" OLDPID=`pgrep -P 1 fossil` SITE=https://example.com PORT=12345 if [ "$1" = "-f" ] ; then PGARGS= ; shift ; fi if [ -n "$OLDPID" ] then echo "Killing running Fossil server first..." pkill $PGARGS fossil for i in $(seq 30) do if [ -n "$(pgrep $PGARGS fossil)" ] then if [ $i -eq 1 ] then echo -n "Waiting for it to die..." else echo -n . fi sleep '0.1' else break fi echo done killall -9 fossil 2> /dev/null fi if [ -x ./fossil ] then # We're running from a build tree, so use that version instead FOSSIL=./fossil fi function start_one() { bn=$1 ln="$2" $FOSSIL server $extra \ --scgi \ --localhost \ --port $PORT \ --jsmode bundled \ --baseurl ${SITE}/$bn \ --errorlog ~/log/fossil/$bn-errors.log \ ~/museum/$bn.fossil > ~/log/fossil/$bn-stdout.log & echo Started $ln Fossil server, port $PORT, PID $!. PORT=$(($PORT + 1)) } start_one first "First Project" start_one second "Second Project" start_one third "Third Project"