Skip to content

Commit

Permalink
chore(shell): use execPath in startup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
huangyoukun committed Jun 7, 2018
1 parent 3e4200d commit ea84641
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions bin/proxy/so.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
echo

CUR_DIR=$(cd $(dirname $0); pwd)
LIBC_VERSION=$(ls -l /lib64/libc.so.6 | sed -e 's/.*libc-2.\(.*\).so/\1/g')

cd ${CUR_DIR}/../
pwd
Expand All @@ -12,23 +11,13 @@ BIN_DIR=$(pwd)

echo "BIN_DIR: ${BIN_DIR}"

echo "libc-2.${LIBC_VERSION}"

if [ -e "/usr/local/bin/node" ]
then
echo "/usr/local/bin/node"
ln -sf /usr/local/bin/node ./TSW
else
echo "/usr/bin/node"
ln -sf /usr/bin/node ./TSW
fi

NODE_PATH=$(node -p process.execPath)
echo "use node:$NODE_PATH"
ln -sf $NODE_PATH ./TSW
chmod +x ./TSW

./TSW -v

echo "copy so done"

if [ -e "../log" ]
then
echo "log exists"
Expand Down

0 comments on commit ea84641

Please sign in to comment.