nixos/tandoor-recipes: replace preStart with ExecStartPre
This commit is contained in:
@@ -119,6 +119,12 @@ in
|
||||
after = lib.optional cfg.database.createLocally "postgresql.target";
|
||||
|
||||
serviceConfig = {
|
||||
ExecStartPre = [
|
||||
"${lib.getExe' pkgs.coreutils "ln"} -sf ${manage} tandoor-recipes-manage"
|
||||
|
||||
# Let django migrate the DB as needed
|
||||
"${lib.getExe pkg} migrate"
|
||||
];
|
||||
ExecStart = ''
|
||||
${pkg.python.pkgs.gunicorn}/bin/gunicorn recipes.wsgi
|
||||
'';
|
||||
@@ -172,13 +178,6 @@ in
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
preStart = ''
|
||||
ln -sf ${manage} tandoor-recipes-manage
|
||||
|
||||
# Let django migrate the DB as needed
|
||||
${pkg}/bin/tandoor-recipes migrate
|
||||
'';
|
||||
|
||||
environment = env // {
|
||||
PYTHONPATH = "${pkg.python.pkgs.makePythonPath pkg.propagatedBuildInputs}:${pkg}/lib/tandoor-recipes";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user