errbot service: fix import config in plugins

This commit is contained in:
Robin Gloster 2016-11-08 17:43:33 +01:00
parent a2b018f55a
commit f422afd07d
No known key found for this signature in database
GPG Key ID: 5E4C836C632C2882

View File

@ -8,7 +8,7 @@ let
name = "errbot-plugins";
paths = plugins;
};
mkConfigFile = instanceCfg: dataDir: pkgs.writeText "errbot-config.py" ''
mkConfigDir = instanceCfg: dataDir: pkgs.writeTextDir "config.py" ''
import logging
BACKEND = '${instanceCfg.backend}'
BOT_DATA_DIR = '${dataDir}'
@ -93,7 +93,7 @@ in {
serviceConfig = {
User = "errbot";
Restart = "on-failure";
ExecStart = "${pkgs.errbot}/bin/errbot -c ${mkConfigFile instanceCfg dataDir}";
ExecStart = "${pkgs.errbot}/bin/errbot -c ${mkConfigDir instanceCfg dataDir}/config.py";
PermissionsStartOnly = true;
};
})) cfg.instances;