Chef Server 12 on Debian Jessie / SVDIR not exported

Hi,

while not being officially supported, I want to run Chef Server 12 (12.3.0) on Debian Jessie.

After fixing Debian’s systemd ego trip as described in chef-cookbooks/chef-server#86, it is installing and running successfully.

While everything works™ then, there is one issue:

# chef-server-ctl status
fail: bookshelf: unable to change to service directory: file does not exist
fail: nginx: unable to change to service directory: file does not exist
... 

I also described this problem here:
http://serverfault.com/questions/736531/chef-server-12-on-debian-jessy-fails-with-unable-to-change-to-service-directory

It turns out that as soon as I export SVDIR=/opt/opscode/service, chef commands work, as runit is able to find the service directory.

I tried setting this variable in /etc/environment, but this is not used for non-login shells (like when I do sudo chef-server-ctl). Only sudo su helps and I found no other way, to fix this on the system level.

So the best would be a solution within chef-server-ctl. Has anyone an overview, where this would fit? I see export SVWAIT=30 in bin/chef-server-ctl. I’m just wondering about the magic that lets it know the service directory on e.g. Ubuntu.

Anyone with an idea?

Steffen