This commit is contained in:
Mr Chen
2024-09-14 11:48:43 +08:00
parent 079ae529ee
commit d4269dc886
2 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -471,8 +471,11 @@ def domainList():
return mw.getJson(data)
def runHook():
return 'run hook'
def runLog():
return getServerDir() + '/data/redis.log'
return getServerDir() + '/data/hook.log'
if __name__ == "__main__":
func = sys.argv[1]
@@ -516,5 +519,7 @@ if __name__ == "__main__":
print(domainAdd())
elif func == 'domain_del':
print(domainDel())
elif func == 'run_hook':
print(runHook())
else:
print('error')
+2 -2
View File
@@ -82,8 +82,8 @@ logs_file=$plugin_path/${rname}.log
''' % (mw_dir, name, getServerDir(), getPluginDir())
cmd += 'echo "★【`date +"%Y-%m-%d %H:%M:%S"`】 STSRT★" >> $logs_file' + "\n"
cmd += 'echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" >> $logs_file' + "\n"
cmd += 'echo "python3 $script_path/index.py update_all"' + "\n"
cmd += 'cd $mw_dir && python3 $script_path/index.py update_all' + "\n"
cmd += 'echo "python3 $script_path/index.py run_hook"' + "\n"
cmd += 'cd $mw_dir && python3 $script_path/index.py run_hook' + "\n"
cmd += 'echo "【`date +"%Y-%m-%d %H:%M:%S"`】 END★" >> $logs_file' + "\n"
cmd += 'echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" >> $logs_file' + "\n"