diff options
author | Thomas Bereknyei <tomberek@gmail.com> | 2015-08-07 01:01:22 -0400 |
---|---|---|
committer | Thomas Bereknyei <tomberek@gmail.com> | 2015-08-07 01:01:22 -0400 |
commit | 6b280b648f7ed505a0911b797f53b21c30c927c9 (patch) | |
tree | d864c005aa11d9265bbd14733e013c50524caec2 /nixos/modules/services/networking/kippo.nix | |
parent | bbe4307715129f5b0f83b36f6ebdf06246ef02da (diff) |
kippo: fix check for pidPath
Diffstat (limited to 'nixos/modules/services/networking/kippo.nix')
-rw-r--r-- | nixos/modules/services/networking/kippo.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/kippo.nix b/nixos/modules/services/networking/kippo.nix index 68f26eefe27e..7d70a3d05fa7 100644 --- a/nixos/modules/services/networking/kippo.nix +++ b/nixos/modules/services/networking/kippo.nix @@ -86,8 +86,7 @@ rec { wantedBy = [ "multi-user.target" ]; environment.PYTHONPATH = "${pkgs.kippo}/src/:${pkgs.pythonPackages.pycrypto}/lib/python2.7/site-packages/:${pkgs.pythonPackages.pyasn1}/lib/python2.7/site-packages/:${pkgs.pythonPackages.python}/lib/python2.7/site-packages/:${pkgs.pythonPackages.twisted}/lib/python2.7/site-packages/:."; preStart = '' - if [ ! -d ${cfg.varPath}/ ] ; then - mkdir -p ${cfg.pidPath} + if [ ! -d ${cfg.varPath}/ ] ; then mkdir -p ${cfg.logPath}/tty mkdir -p ${cfg.logPath}/dl mkdir -p ${cfg.varPath}/keys @@ -97,12 +96,15 @@ rec { cp ${pkgs.kippo}/src/txtcmds ${cfg.varPath} -r chmod u+rw ${cfg.varPath} -R - chmod u+rw ${cfg.pidPath} chown kippo.kippo ${cfg.varPath} -R - chown kippo.kippo ${cfg.pidPath} chown kippo.kippo ${cfg.logPath} -R chmod u+rw ${cfg.logPath} -R fi + if [ ! -d ${cfg.pidPath}/ ] ; then + mkdir -p ${cfg.pidPath} + chmod u+rw ${cfg.pidPath} + chown kippo.kippo ${cfg.pidPath} + fi ''; serviceConfig.ExecStart = "${pkgs.pythonPackages.twisted}/bin/twistd -y ${pkgs.kippo}/src/kippo.tac --syslog --rundir=${cfg.varPath}/ --pidfile=${cfg.pidPath}/kippo.pid --prefix=kippo -n"; |