Update index.py

This commit is contained in:
midoks 2022-10-10 23:22:43 +08:00
parent 0e31e87e28
commit 7ea486cd1d
1 changed files with 4 additions and 3 deletions

View File

@ -186,9 +186,10 @@ def changeSwap():
size = args['size']
swapOp('stop')
cmd = 'dd if=/dev/zero of=' + getServerDir() + '/swapfile bs=1M count=' + size
cmd += ' && mkswap ' + getServerDir() + '/swapfile && chmod 600 ' + \
getServerDir() + '/swapfile'
gsdir = getServerDir()
cmd = 'dd if=/dev/zero of=' + gsdir + '/swapfile bs=1M count=' + size
cmd += ' && mkswap ' + gsdir + '/swapfile && chmod 600 ' + gsdir + '/swapfile'
msg = mw.execShell(cmd)
swapOp('start')