From c2c413a9ef97e81d1c752437b7efd07adba0d0bc Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 1 Mar 2019 17:51:22 +0800 Subject: [PATCH] Update index.py --- plugins/l2tp/index.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/l2tp/index.py b/plugins/l2tp/index.py index 1130fb6a3..822e3d441 100755 --- a/plugins/l2tp/index.py +++ b/plugins/l2tp/index.py @@ -66,24 +66,30 @@ def status(): def start(): data = public.execShell('service xl2tpd start') - if data[1] == '': + if data[0] == '': return 'ok' return data[1] def stop(): data = public.execShell('service xl2tpd stop') - if data[1] == '': + if data[0] == '': return 'ok' return data[1] def restart(): - return 'ok' + data = public.execShell('service xl2tpd restart') + if data[0] == '': + return 'ok' + return data[1] def reload(): - return 'ok' + data = public.execShell('service xl2tpd reload') + if data[0] == '': + return 'ok' + return data[1] def getPathFile():