Put sockest and pids in run folder

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the unix category.

Last Updated: 2024-11-23

Put your systemd pids and sockets in a subdirectory of /run This convention makes them easier to find on servers, and makes writing configurations for interconnecting services much easier since you don't have to worry about long paths (in some guides they will ask you to store these files like 10 directories deep and this is super brittle / error-prone)

For this to work, your subdirectory must be writable by the process running your code. Do NOT change the permissions of the whole /run dir - that would be a serious security hole.