mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update install.sh
This commit is contained in:
@@ -67,6 +67,22 @@ get_arch() {
|
||||
esac
|
||||
}
|
||||
|
||||
check_init() {
|
||||
init=$(readlink /sbin/init)
|
||||
case "$init" in
|
||||
*systemd*)
|
||||
INIT=systemd
|
||||
;;
|
||||
*openrc-init*|*busybox*)
|
||||
INIT=openrc
|
||||
;;
|
||||
*)
|
||||
err "Unknown init"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
load_vars() {
|
||||
OS=$(uname | tr '[:upper:]' '[:lower:]')
|
||||
TARGET_DIR="$serverPath/nezha/dashboard"
|
||||
@@ -123,10 +139,10 @@ Install_dashborad(){
|
||||
fi
|
||||
|
||||
unzip $DOWNLOAD_FILE -d $TARGET_DIR
|
||||
|
||||
|
||||
echo "TARGET_DIR:"$TARGET_DIR
|
||||
|
||||
cd $TARGET_DIR && dashboard-linux-${ARCH} app
|
||||
|
||||
rm -rf $DOWNLOAD_FILE
|
||||
|
||||
|
||||
@@ -138,6 +154,7 @@ Install_App()
|
||||
{
|
||||
load_vars
|
||||
get_arch
|
||||
check_init
|
||||
|
||||
Install_dashborad
|
||||
|
||||
|
||||
Reference in New Issue
Block a user