Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions scripts/init.d/mw.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ mw_install(){
fi

mw_common_proxy
echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install.sh")"
bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install.sh")
echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/AndyXeCM/PowerLinux/main/scripts/install.sh")"
bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/AndyXeCM/PowerLinux/main/scripts/install.sh")
}

mw_update()
Expand All @@ -387,8 +387,8 @@ mw_update()
fi

mw_common_proxy
echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/master/scripts/update.sh")"
bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/master/scripts/update.sh")
echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/AndyXeCM/PowerLinux/main/scripts/update.sh")"
bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/AndyXeCM/PowerLinux/main/scripts/update.sh")
}

mw_update_dev()
Expand All @@ -399,8 +399,8 @@ mw_update_dev()
fi

mw_common_proxy
echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh")"
bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh")
echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/AndyXeCM/PowerLinux/main/scripts/update_dev.sh")"
bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/AndyXeCM/PowerLinux/main/scripts/update_dev.sh")

cd ${PANEL_DIR}
}
Expand All @@ -412,8 +412,8 @@ mw_update_venv()
rm -rf ${PANEL_DIR}/lib

mw_common_proxy
echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh")"
bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh")
echo "bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/AndyXeCM/PowerLinux/main/scripts/update_dev.sh")"
bash <(curl -fsSL "${HTTP_PREFIX}raw.githubusercontent.com/AndyXeCM/PowerLinux/main/scripts/update_dev.sh")

cd ${PANEL_DIR}
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ERROR='[\033[31mERROR\033[0m]'
WORKING='[\033[34m*\033[0m]'
REPO_OWNER="AndyXeCM"
REPO_NAME="PowerLinux"
REPO_BRANCH="master"
REPO_BRANCH="main"


# LANG=en_US.UTF-8
Expand Down Expand Up @@ -152,7 +152,7 @@ if [ "$LOCAL_ADDR" != "common" ];then
fi

if [ -f /etc/motd ];then
echo "welcome to mdserver-web panel" > /etc/motd
echo "welcome to PowerLinux panel" > /etc/motd
fi

startTime=`date +%s`
Expand Down
12 changes: 8 additions & 4 deletions scripts/install/macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ LANG=en_US.UTF-8

USER=$(who | sed -n "2,1p" |awk '{print $1}')
DEV="/Users/${USER}/Desktop/mwdev"
REPO_OWNER="AndyXeCM"
REPO_NAME="PowerLinux"
REPO_BRANCH="main"


mkdir -p $DEV
Expand All @@ -31,11 +34,12 @@ brew install pcre2 libxpm libelf
brew install automake icu4c libmemcached

if [ ! -d $DEV/server/mdserver-web ]; then
wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
wget -O /tmp/master.zip https://codeload.github.com/${REPO_OWNER}/${REPO_NAME}/zip/${REPO_BRANCH}
TARBALL_DIR=$(unzip -Z1 /tmp/master.zip | head -1 | cut -d/ -f1)
cd /tmp && unzip /tmp/master.zip
mv /tmp/mdserver-web-master $DEV/server/mdserver-web
mv /tmp/${TARBALL_DIR} $DEV/server/mdserver-web
rm -f /tmp/master.zip
rm -rf /tmp/mdserver-web-master
rm -rf /tmp/${TARBALL_DIR}
fi

if [ ! -d $DEV/server/lib ]; then
Expand All @@ -57,4 +61,4 @@ cd $DEV/server/mdserver-web && ./cli.sh stop

sleep 5
cd $DEV/server/mdserver-web && ./scripts/init.d/mw default
cd $DEV/server/mdserver-web && ./cli.sh debug
cd $DEV/server/mdserver-web && ./cli.sh debug
22 changes: 13 additions & 9 deletions scripts/install_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ WORKING='[\033[34m*\033[0m]'

# LANG=en_US.UTF-8
is64bit=`getconf LONG_BIT`
REPO_OWNER="AndyXeCM"
REPO_NAME="PowerLinux"
REPO_BRANCH="main"


if [ -f /www/server/mdserver-web/tools.py ];then
Expand All @@ -25,8 +28,8 @@ if [ -f /www/server/mdserver-web/tools.py ];then
exit 0
fi

echo -e "您正在安装的是\033[31mmdserver-web测试版\033[0m,非开发测试用途请使用正式版 install.sh !"
echo -e "You are installing\033[31m mdserver-web dev version\033[0m, normally use install.sh for production.\n"
echo -e "您正在安装的是\033[31mPowerLinux测试版\033[0m,非开发测试用途请使用正式版 install.sh !"
echo -e "You are installing\033[31m PowerLinux dev version\033[0m, normally use install.sh for production.\n"
sleep 1

LOG_FILE=/var/log/mw-install.log
Expand Down Expand Up @@ -153,7 +156,7 @@ if [ "$LOCAL_ADDR" != "common" ];then
fi

if [ -f /etc/motd ];then
echo "welcome to mdserver-web panel" > /etc/motd
echo "welcome to PowerLinux panel" > /etc/motd
fi

startTime=`date +%s`
Expand Down Expand Up @@ -234,12 +237,13 @@ if [ $OSNAME != "macos" ];then
mkdir -p /www/backup/site

if [ ! -d /www/server/mdserver-web ];then
echo "downloading ${HTTP_PREFIX}github.com/midoks/mdserver-web/archive/refs/heads/dev.tar.gz"
curl --insecure -sSLo /tmp/dev.tar.gz ${HTTP_PREFIX}github.com/midoks/mdserver-web/archive/refs/heads/dev.tar.gz
echo "downloading ${HTTP_PREFIX}github.com/${REPO_OWNER}/${REPO_NAME}/archive/refs/heads/${REPO_BRANCH}.tar.gz"
curl --insecure -sSLo /tmp/dev.tar.gz ${HTTP_PREFIX}github.com/${REPO_OWNER}/${REPO_NAME}/archive/refs/heads/${REPO_BRANCH}.tar.gz
TARBALL_DIR=$(tar -tf /tmp/dev.tar.gz | head -1 | cut -d/ -f1)
cd /tmp && tar -zxvf /tmp/dev.tar.gz
mv -f /tmp/mdserver-web-dev /www/server/mdserver-web
mv -f /tmp/${TARBALL_DIR} /www/server/mdserver-web
rm -rf /tmp/dev.tar.gz
rm -rf /tmp/mdserver-web-dev
rm -rf /tmp/${TARBALL_DIR}
fi

# install acme.sh
Expand All @@ -258,7 +262,7 @@ fi
echo "use system version: ${OSNAME}"

if [ "${OSNAME}" == "macos" ];then
curl --insecure -fsSL ${HTTP_PREFIX}raw.githubusercontent.com/midoks/mdserver-web/refs/heads/dev/scripts/install/macos.sh | bash
curl --insecure -fsSL ${HTTP_PREFIX}raw.githubusercontent.com/${REPO_OWNER}/${REPO_NAME}/main/scripts/install/macos.sh | bash
else
cd /www/server/mdserver-web && bash scripts/install/${OSNAME}.sh
fi
Expand Down Expand Up @@ -300,4 +304,4 @@ echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
} 1> >(tee $LOG_FILE) 2>&1

echo -e "\nInstall completed. If error occurs, please contact us with the log file mw-install.log ."
echo "安装完毕,如果出现错误,请带上同目录下的安装日志 mw-install.log 联系我们反馈."
echo "安装完毕,如果出现错误,请带上同目录下的安装日志 mw-install.log 联系我们反馈."
2 changes: 1 addition & 1 deletion scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export PATH
is64bit=`getconf LONG_BIT`
REPO_OWNER="AndyXeCM"
REPO_NAME="PowerLinux"
REPO_BRANCH="master"
REPO_BRANCH="main"

startTime=`date +%s`

Expand Down
20 changes: 10 additions & 10 deletions scripts/update_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ WORKING='[\033[34m*\033[0m]'

# LANG=en_US.UTF-8
is64bit=`getconf LONG_BIT`
REPO_OWNER="AndyXeCM"
REPO_NAME="PowerLinux"
REPO_BRANCH="main"

startTime=`date +%s`

Expand Down Expand Up @@ -214,19 +217,16 @@ if [ -f /tmp/dev.tar.gz ];then
rm -rf /tmp/dev.tar.gz
fi

if [ -d /tmp/mdserver-web-dev ];then
rm -rf /tmp/mdserver-web-dev
fi

echo "update mdserver-web dev code start"
echo "update PowerLinux dev code start"

curl --insecure -sSLo /tmp/dev.tar.gz ${HTTP_PREFIX}github.com/midoks/mdserver-web/archive/refs/heads/dev.tar.gz
curl --insecure -sSLo /tmp/dev.tar.gz ${HTTP_PREFIX}github.com/${REPO_OWNER}/${REPO_NAME}/archive/refs/heads/${REPO_BRANCH}.tar.gz
TARBALL_DIR=$(tar -tf /tmp/dev.tar.gz | head -1 | cut -d/ -f1)
cd /tmp && tar -zxvf /tmp/dev.tar.gz
$CP_CMD -rf /tmp/mdserver-web-dev/* /www/server/mdserver-web
$CP_CMD -rf /tmp/${TARBALL_DIR}/* /www/server/mdserver-web
rm -rf /tmp/dev.tar.gz
rm -rf /tmp/mdserver-web-dev
rm -rf /tmp/${TARBALL_DIR}

echo "update mdserver-web dev code end"
echo "update PowerLinux dev code end"


#pip uninstall public
Expand All @@ -250,4 +250,4 @@ endTime=`date +%s`
((outTime=($endTime-$startTime)/60))
echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"

} 1> >(tee $LOG_FILE) 2>&1
} 1> >(tee $LOG_FILE) 2>&1
Loading
Loading