]> git.llucax.com Git - software/pymin.git/blobdiff - pymin/services/vrrp/__init__.py
Merge commit 'scm/master'
[software/pymin.git] / pymin / services / vrrp / __init__.py
index c8563a699b6923f091ea50be67532ddf94121d26..403cd364fdac153229282e8fb6230cc921680eb3 100644 (file)
@@ -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()
+