mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update index.py
This commit is contained in:
@@ -186,9 +186,10 @@ def changeSwap():
|
|||||||
size = args['size']
|
size = args['size']
|
||||||
swapOp('stop')
|
swapOp('stop')
|
||||||
|
|
||||||
cmd = 'dd if=/dev/zero of=' + getServerDir() + '/swapfile bs=1M count=' + size
|
gsdir = getServerDir()
|
||||||
cmd += ' && mkswap ' + getServerDir() + '/swapfile && chmod 600 ' + \
|
|
||||||
getServerDir() + '/swapfile'
|
cmd = 'dd if=/dev/zero of=' + gsdir + '/swapfile bs=1M count=' + size
|
||||||
|
cmd += ' && mkswap ' + gsdir + '/swapfile && chmod 600 ' + gsdir + '/swapfile'
|
||||||
msg = mw.execShell(cmd)
|
msg = mw.execShell(cmd)
|
||||||
swapOp('start')
|
swapOp('start')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user