forked from lix-project/hydra
Merge pull request #152 from aszlig/module-without-su
hydra-module: Don't rely on su being available in shadow.
This commit is contained in:
commit
b7816eacd5
|
@ -184,7 +184,7 @@ in
|
||||||
requires = [ "postgresql.service" ];
|
requires = [ "postgresql.service" ];
|
||||||
after = [ "postgresql.service" ];
|
after = [ "postgresql.service" ];
|
||||||
environment = env;
|
environment = env;
|
||||||
script = ''
|
preStart = ''
|
||||||
mkdir -m 0700 -p ${baseDir}/data
|
mkdir -m 0700 -p ${baseDir}/data
|
||||||
chown hydra ${baseDir}/data
|
chown hydra ${baseDir}/data
|
||||||
ln -sf ${hydraConf} ${baseDir}/data/hydra.conf
|
ln -sf ${hydraConf} ${baseDir}/data/hydra.conf
|
||||||
|
@ -195,8 +195,9 @@ in
|
||||||
touch ${baseDir}/.db-created
|
touch ${baseDir}/.db-created
|
||||||
fi
|
fi
|
||||||
''}
|
''}
|
||||||
${pkgs.shadow}/bin/su hydra -c ${cfg.package}/bin/hydra-init
|
|
||||||
'';
|
'';
|
||||||
|
serviceConfig.ExecStart = "${cfg.package}/bin/hydra-init";
|
||||||
|
serviceConfig.User = "hydra";
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
serviceConfig.RemainAfterExit = true;
|
serviceConfig.RemainAfterExit = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue