pull/109/head
midoks 4 years ago
parent e09dba5329
commit 1a5105f3f3
  1. 13
      plugins/zimg/index.py
  2. 4
      plugins/zimg/init.d/zimg.tpl

@ -5,6 +5,7 @@ import io
import os import os
import time import time
import shutil import shutil
import subprocess
sys.path.append(os.getcwd() + "/class/core") sys.path.append(os.getcwd() + "/class/core")
import mw import mw
@ -86,11 +87,13 @@ def status():
def start(): def start():
file = initDreplace() file = initDreplace()
data = mw.execShell(file + ' start') subprocess.Popen(file + ' start',
stdout=subprocess.PIPE, shell=True)
if data[1] == '': return 'ok'
return 'ok' # data = mw.execShell(file + ' start')
return data[1] # if data[1] == '':
# return 'ok'
# return data[1]
def stop(): def stop():

@ -15,8 +15,8 @@
app_start(){ app_start(){
# aria2c -D # aria2c -D
cd {$SERVER_PATH}/zimg cd {$SERVER_PATH}/zimg/bin
./zimg -d --conf={$SERVER_PATH}/bin/conf/zimg.lua ./zimg -d --conf={$SERVER_PATH}/zimg/bin/conf/zimg.lua &
echo "zimg started" echo "zimg started"
} }
app_stop(){ app_stop(){

Loading…
Cancel
Save