X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/c24ff8fe271afa669950036d6d91b071a01d6e34..722e355a1d01c2620dc665af8ffaa8f7b0d04994:/pymin/services/vpn/__init__.py diff --git a/pymin/services/vpn/__init__.py b/pymin/services/vpn/__init__.py index 1e84361..d251640 100644 --- a/pymin/services/vpn/__init__.py +++ b/pymin/services/vpn/__init__.py @@ -1,8 +1,10 @@ # vim: set encoding=utf-8 et sw=4 sts=4 : import os +import signal from os import path + from pymin.seqtools import Sequence from pymin.dispatcher import Handler, handler, HandlerError from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \ @@ -106,10 +108,10 @@ class VpnHandler(Restorable, ConfigWriter, @handler('usage: stop ') def stop(self, vpn_src): if vpn_src in self.vpns: - if path.exists('/var/lib/run/tincd.' + vpn_src + '.pid'): - pid = file('/var/lib/run/tincd.' + vpn_src + '.pid').readline() + if path.exists('/var/run/tinc.' + vpn_src + '.pid'): + pid = file('/var/run/tinc.' + vpn_src + '.pid').readline() try: - os.kill(int(pid.strip()), SIGTERM) + os.kill(int(pid.strip()), signal.SIGTERM) except OSError: pass # XXX report error?