Commit 429b7c92 authored by Łukasz Nowak's avatar Łukasz Nowak

Drop recipe internal killpidfromfile.

parent 62193cff
...@@ -58,10 +58,6 @@ class Recipe(BaseSlapRecipe): ...@@ -58,10 +58,6 @@ class Recipe(BaseSlapRecipe):
# self.cron_d is a directory, where cron jobs can be registered # self.cron_d is a directory, where cron jobs can be registered
self.cron_d = self.installCrond() self.cron_d = self.installCrond()
self.logrotate_d, self.logrotate_backup = self.installLogrotate() self.logrotate_d, self.logrotate_backup = self.installLogrotate()
self.killpidfromfile = zc.buildout.easy_install.scripts(
[('killpidfromfile', __name__ + '.killpidfromfile',
'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0]
self.path_list.append(self.killpidfromfile)
ca_conf = self.installCertificateAuthority() ca_conf = self.installCertificateAuthority()
# memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(), # memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(),
......
import sys
import os
import signal
def killpidfromfile():
file = sys.argv[1]
sig = getattr(signal, sys.argv[2], None)
if sig is None:
raise ValueError('Unknwon signal name %s' % sys.argv[2])
if os.path.exists(file):
pid = int(open(file).read())
print 'Killing pid %s with signal %s' % (pid, sys.argv[2])
os.kill(pid, sig)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment