1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

kippo: fix check for pidPath

This commit is contained in:
Thomas Bereknyei 2015-08-07 01:01:22 -04:00
parent bbe4307715
commit 6b280b648f

View file

@ -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";