From 02b2acfbc76f816cc46e0d63f9e215fe25df172e Mon Sep 17 00:00:00 2001 From: wincsb Date: Thu, 23 May 2024 09:27:06 +0800 Subject: [PATCH] Fix tarsnode running user Fixed the issue that the tarsnode process could not be run by the specified running user when installing a node --- app/service/resource/tarsnode_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/service/resource/tarsnode_install.sh b/app/service/resource/tarsnode_install.sh index 30380acf..b4a12ac0 100644 --- a/app/service/resource/tarsnode_install.sh +++ b/app/service/resource/tarsnode_install.sh @@ -111,8 +111,8 @@ if [ $OS != 3 ]; then uid=`whoami` if [ "$uid" != "${runuser}" ] && [ "${runuser}" != "" ]; then - echo "su $runuser: now uid:$uid, runuser:$runuser" - su - $runuser -c "sh ${TARS_PATH}/tarsnode/util/start.sh" + echo "su ${runuser}: now uid:$uid, runuser:${runuser}" + su - ${runuser} -c "sh ${TARS_PATH}/tarsnode/util/start.sh" else sh ${TARS_PATH}/tarsnode/util/start.sh fi