From 1d46b3835fd1845a44d0dc7b0ee1b0bef7d69802 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sat, 19 Jan 2019 15:12:44 +0800 Subject: [PATCH] Update common.py --- class/core/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/class/core/common.py b/class/core/common.py index fd8682bb5..ae9622aeb 100755 --- a/class/core/common.py +++ b/class/core/common.py @@ -38,8 +38,8 @@ def initDB(): def initInitD(): script = public.getRunDir() + '/scripts/init.d/mw.tpl' script_bin = public.getRunDir() + '/scripts/init.d/mw' - if os.path.exists(script_bin): - return + # if os.path.exists(script_bin): + # return content = public.readFile(script) content = content.replace("{$SERVER_PATH}", public.getRunDir()) @@ -47,7 +47,7 @@ def initInitD(): public.writeFile(script_bin, content) public.execShell('chmod +x ' + script_bin) - if public.getOs() != 'darwin': + if not public.isAppleSystem(): initd_bin = '/etc/init.d/mw' if not os.path.exists(initd_bin): shutil.copyfile(script_bin, initd_bin)