X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/0dcb923d42a7489756eddd83a13a3059d8a24b2a..3a8d568a57ec58e100ea65338e78f77c1c05b7e9:/pymin/services/vrrp/__init__.py diff --git a/pymin/services/vrrp/__init__.py b/pymin/services/vrrp/__init__.py index c8563a6..403cd36 100644 --- a/pymin/services/vrrp/__init__.py +++ b/pymin/services/vrrp/__init__.py @@ -13,8 +13,6 @@ from pymin.services.util import Restorable, TransactionalHandler, \ __ALL__ = ('VrrpHandler',) -pid_filename = 'vrrp.pid' - class VrrpHandler(Restorable, ParametersHandler, ReloadHandler, RestartHandler, ServiceHandler, TransactionalHandler): @@ -40,6 +38,7 @@ class VrrpHandler(Restorable, ParametersHandler, ReloadHandler, RestartHandler, def _service_stop(self): try: + pid_filename = 'vrrpd_%(dev)s_%(id)s.pid' % self.params pid = file(path.join(self._pid_dir, pid_filename )).read().strip() os.kill(int(pid), SIGTERM) except (IOError, OSError): @@ -55,4 +54,5 @@ class VrrpHandler(Restorable, ParametersHandler, ReloadHandler, RestartHandler, if __name__ == '__main__': v = VrrpHandler() v.set('prio','10') - v.commit() \ No newline at end of file + v.commit() +