This commit is contained in:
dami
2026-09-11 22:48:34 +08:00
parent a61644861b
commit 4efdf7606c
23 changed files with 72 additions and 72 deletions
+5 -5
View File
@@ -31,7 +31,7 @@ LOG_FILE=/var/log/mw-install.log
HTTP_PREFIX="https://"
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
fi
@@ -106,7 +106,7 @@ function ChooseProxyURL(){
read -p "${CHOICE_A}" INPUT
# echo $INPUT
if [ "$INPUT" == "" ];then
if [ "$INPUT" = "" ];then
INPUT=1
TMP_INPUT=`expr $INPUT - 1`
INPUT_KEY=${SOURCE_LIST_KEY[$TMP_INPUT]}
@@ -157,7 +157,7 @@ startTime=`date +%s`
_os=`uname`
echo "use system: ${_os}"
if [ ${_os} == "Darwin" ]; then
if [ ${_os} = "Darwin" ]; then
OSNAME='macos'
elif grep -Eqi "openSUSE" /etc/*-release; then
OSNAME='opensuse'
@@ -248,13 +248,13 @@ if [ $OSNAME != "macos" ];then
fi
echo "use system version: ${OSNAME}"
if [ "${OSNAME}" == "macos" ];then
if [ "${OSNAME}" = "macos" ];then
curl --insecure -fsSL ${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/refs/heads/dev/scripts/install/macos.sh | bash
else
cd /www/server/mdserver-web && bash scripts/install/${OSNAME}.sh
fi
if [ "${OSNAME}" == "macos" ];then
if [ "${OSNAME}" = "macos" ];then
echo "macos end"
exit 0
fi