Today I had to write lots of supervisor config files for many microservices running on an outdated OpenVZ kernel (aka doesn’t support docker/rkt).
I hate manually editing a bunch of files which have almost exactly the same content so I built this easy tool in bash.
Wut duz it do?
supervisor-config-gen will take your current directory, assume you have an executable run.sh file and create this neat general-purpose supervisor config inside the current dir
% cat shitty-app-supervisor.conf
[program:shitty-app]
command=/home/not-root/supervisor-config-gen/shitty-app/run.sh
directory=/home/not-root/supervisor-config-gen/shitty-app
process_name=%(program_name)s
numprocs=1
user=not-root
stopsignal=TERM
stopwaitsecs=10
stopasgroup=true
killasgroup=true
autostart=true
autorestart=true
redirect_stderr=true
redirect_stdout=true
stdout_logfile=/home/not-root/logs/supervisord/%(program_name)s-out.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=10
stderr_logfile=/home/not-root/logs/supervisord/%(program_name)s-err.log
stderr_logfile_maxbytes=50MBNow what?
To have supervisor read it, either move it to /etc/supervisor/config.d/
% sudo mv shitty-app-supervisor.conf /etc/supervisor/config.d/shitty-app-supervisor.confor create a symbolic link to it
% sudo ln -s $(pwd)/shitty-app-supervisor.conf /etc/supervisor/conf.d/shitty-app-supervisor.confFuckin’ easy! xD
Check it out on github https://github.com/psyb0t/supervisor-config-gen
Installing It Into Your Agent
A 2019 utility with an agent plugin. I’m as surprised as you are. Everything under.agents/ is catalogued in one marketplace, so it is two commands:claude plugin marketplace add psyb0t/agents
claude plugin install supervisor-config-gen@psyb0tCodex uses the same marketplace with a different verb — codex plugin add supervisor-config-gen@psyb0t, because there is no codex plugin install. It also finds the skill on its own in a checkout of the repo, since it scans .agents/skills/ natively with nothing installed at all.