From a320ad5a4404412c511548527b560de351797b61 Mon Sep 17 00:00:00 2001 From: XanderYe Date: Mon, 17 Jan 2022 12:56:47 +0800 Subject: [PATCH] feat: use ld_preload on df_coserver_r --- build/Centos6-DNF/root/run | 8 +++++++- build/Centos7-DNF/root/run | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/build/Centos6-DNF/root/run b/build/Centos6-DNF/root/run index 73208b6..ca0142f 100755 --- a/build/Centos6-DNF/root/run +++ b/build/Centos6-DNF/root/run @@ -87,7 +87,13 @@ cd /home/neople/coserver chmod 777 * rm -f /home/neople/coserver/pid/*.pid rm -rf /home/neople/coserver/log/*.* -./df_coserver_r coserver start & +if $PRELOAD_LD;then + echo "start game use LD_PRELOAD mode" + LD_PRELOAD=/lib/libhook.so ./df_coserver_r coserver start & +else + echo "start game use normal mode" + ./df_coserver_r coserver start & +fi cd /home/neople/community chmod 777 * diff --git a/build/Centos7-DNF/root/run b/build/Centos7-DNF/root/run index 73208b6..ca0142f 100755 --- a/build/Centos7-DNF/root/run +++ b/build/Centos7-DNF/root/run @@ -87,7 +87,13 @@ cd /home/neople/coserver chmod 777 * rm -f /home/neople/coserver/pid/*.pid rm -rf /home/neople/coserver/log/*.* -./df_coserver_r coserver start & +if $PRELOAD_LD;then + echo "start game use LD_PRELOAD mode" + LD_PRELOAD=/lib/libhook.so ./df_coserver_r coserver start & +else + echo "start game use normal mode" + ./df_coserver_r coserver start & +fi cd /home/neople/community chmod 777 *