me: maybe i should try to work out how to deploy this whole thing as an actually working webserver
me, hours later, surrounded by documentation for systemd: aughhhhhhhhhhhh
(there's a rarely-downloaded hackage lib that supposedly handles daemonization, except it generates an executable that might not automatically obey all the fiddly old-style systemd requirements and can't be used as a new-style systemd init script since it's an executable and apparently systemd might inspect the script file for a comment header. but that might not matter? but it doesn't work anyway, since it generates an executable that assume it's gonna be run as root and fails to do much of anything during testing (i mean, unless i run it as root, obviously, and even then 1. i can't stop it through the provided interface and 2. it doesn't seem to log correctly which is half the point of getting the process running as a daemon -- new-style daemons can just output to stdout while some kinda wrapper redirects that to a logfile, which does not appear to be happening) and even then there's the open question of how to hook that executable up to a script that's gonna run it. there's a lot of stuff in /etc/rc*.d but i have no clue how those work, and seem to have the same issue of expecting a script where i have an executable. new-style systemd unit files might or might not handle pid files automagically for you, or they might permit pid file specifications but not really do anything with that information; it's unclear. likewise they might automatically daemonize any program you tell them to use and they might not. i don't know to what degree this hackage lib and systemd have overlapping concerns or different ideas of what a daemon is (since there are like five different ways to daemonize something))
in conclusion sysadmin work makes me want to die
me, hours later, surrounded by documentation for systemd: aughhhhhhhhhhhh
(there's a rarely-downloaded hackage lib that supposedly handles daemonization, except it generates an executable that might not automatically obey all the fiddly old-style systemd requirements and can't be used as a new-style systemd init script since it's an executable and apparently systemd might inspect the script file for a comment header. but that might not matter? but it doesn't work anyway, since it generates an executable that assume it's gonna be run as root and fails to do much of anything during testing (i mean, unless i run it as root, obviously, and even then 1. i can't stop it through the provided interface and 2. it doesn't seem to log correctly which is half the point of getting the process running as a daemon -- new-style daemons can just output to stdout while some kinda wrapper redirects that to a logfile, which does not appear to be happening) and even then there's the open question of how to hook that executable up to a script that's gonna run it. there's a lot of stuff in /etc/rc*.d but i have no clue how those work, and seem to have the same issue of expecting a script where i have an executable. new-style systemd unit files might or might not handle pid files automagically for you, or they might permit pid file specifications but not really do anything with that information; it's unclear. likewise they might automatically daemonize any program you tell them to use and they might not. i don't know to what degree this hackage lib and systemd have overlapping concerns or different ideas of what a daemon is (since there are like five different ways to daemonize something))
in conclusion sysadmin work makes me want to die