I use runit to daemonize my web application, and I'm trying to see if I can have my process managed by sv not have to have a corresponding envdir for its environment variables. I wonder if I can just pass those vars directly into my call to chpst. This is the run file under /etc/service/myapp:
#!/bin/sh
exec 2>&1
cd /var/www/myapp
# what it currently looks like
exec chpst -u www-data:www-data /var/www/myapp/myapp
# what I'd ideally like to be able to do
FOO=bar BAZ=qux exec chpst -u www-data:www-data /var/www/myapp/myapp
As I mentioned, chpst also comes with a -e option to pass a directly with environment variables to it, I could use that, but I'm trying to avoid it for simplicity (fewer things to maintain). Is that at all possible? Tips?