This commit is contained in:
midoks
2022-11-20 12:06:24 +08:00
parent 7fd59222a9
commit 440fa1c535
2 changed files with 13 additions and 2 deletions
+12 -1
View File
@@ -100,6 +100,9 @@ def initInitD():
if not mw.isAppleSystem() and not os.path.exists("/etc/rc.d/init.d"):
mw.execShell('mkdir -p /etc/rc.d/init.d')
if not mw.isAppleSystem() and not os.path.exists("/etc/init.d"):
mw.execShell('mkdir -p /etc/init.d')
# initd
if os.path.exists('/etc/rc.d/init.d'):
initd_bin = '/etc/rc.d/init.d/mw'
@@ -107,8 +110,16 @@ def initInitD():
import shutil
shutil.copyfile(script_bin, initd_bin)
mw.execShell('chmod +x ' + initd_bin)
# 加入自启动
mw.execShell('which chkconfig && chkconfig --add mw')
if os.path.exists('/etc/init.d'):
initd_bin = '/etc/init.d/mw'
if not os.path.exists(initd_bin):
import shutil
shutil.copyfile(script_bin, initd_bin)
mw.execShell('chmod +x ' + initd_bin)
# 加入自启动
mw.execShell('which update-rc.d && update-rc.d -f mw defaults')
# 获取系统IPV4
+1 -1
View File
@@ -492,7 +492,7 @@ function getFiles(Path) {
<li><a href="javascript:createFile(0,\'' + Path + '\');">新建空白文件</a></li>\
<li><a href="javascript:createDir(0,\'' + Path + '\');">新建目录</a></li>\
</ul>\
</div>';
</div>';
if (rdata.PATH != '/') {
BarTools += ' <button onclick="javascript:backDir();" class="btn btn-default btn-sm glyphicon glyphicon-arrow-left" title="返回上一级"></button>';
}