Update index.py

pull/209/head
midoks 3 years ago
parent 8c621c892e
commit 0e31e87e28
  1. 6
      plugins/swap/index.py

@ -187,11 +187,9 @@ def changeSwap():
swapOp('stop')
cmd = 'dd if=/dev/zero of=' + getServerDir() + '/swapfile bs=1M count=' + size
msg = mw.execShell(cmd)
cmd = 'mkswap ' + getServerDir() + '/swapfile && chmod 600 ' + \
cmd += ' && mkswap ' + getServerDir() + '/swapfile && chmod 600 ' + \
getServerDir() + '/swapfile'
os.system(cmd)
msg = mw.execShell(cmd)
swapOp('start')
return mw.returnJson(True, "修改成功!:" + msg[0])

Loading…
Cancel
Save