Hi, I managed to build a statically linked #snac with musl (and zlib, curl and openssl).
Now I realized that I could deploy it as a FastCGI, but I wonder how I could stop a running process on snac update.
Is there a kill switch one could toggle eg by creating an empty file with a specific name under the data dir? Or maybe a version file that is periodically checked by snac processes that exit() when you start a new version?
Or maybe something even simpler I'm missing?
Also, I've read that snac now support unix domain sockets, but I can't find anything about that in the doc... where should I look?
I think that with a pid and an oprion to automatically demonize (sysv way, doible fork, setsid, detaching from the terminal...) it would be trivial to run snac on a shared hosting even if it doesn't support fastcgi: you just need a script to start it.
kill
command, or by configuring it under a service control system like systemd, or rc file, and stopping it from there. You have many examples of how to do this in theexamples/
directory of the source repository.Regarding the use of a Unix socket, just set the
address
field with the full path to it (instead of an IP address), like described insnac(8)
, the Administrator Manual: https://comam.es/snac-doc/snac.8.html#address