From b6f2f397458248d4938895ff4d5540cdcd9c6436 Mon Sep 17 00:00:00 2001 From: wukongdaily <2666180@gmail.com> Date: Mon, 1 Jul 2024 20:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=AE=BF=E4=B8=BB?= =?UTF-8?q?=E6=9C=BA=E6=96=87=E4=BB=B6=E6=98=A0=E5=B0=84=20=E6=96=B9?= =?UTF-8?q?=E4=BE=BF1panel=E7=AE=A1=E7=90=86=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zero3/istorepanel.sh | 118 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 zero3/istorepanel.sh diff --git a/zero3/istorepanel.sh b/zero3/istorepanel.sh new file mode 100644 index 0000000..a3ceb5c --- /dev/null +++ b/zero3/istorepanel.sh @@ -0,0 +1,118 @@ +#!/bin/sh +# base on Author Xiaobao(xiaobao@linkease.com) +# 增加了宿主机文件映射 方便1panel管理文件 + +ACTION=${1} +shift 1 + +do_install() { + local port=$(uci get istorepanel.@main[0].port 2>/dev/null) + local image_name=$(uci get istorepanel.@main[0].image_name 2>/dev/null) + local config=$(uci get istorepanel.@main[0].config_path 2>/dev/null) + local entrance=$(uci get istorepanel.@main[0].entrance 2>/dev/null) + local username=$(uci get istorepanel.@main[0].username 2>/dev/null) + local password=$(uci get istorepanel.@main[0].password 2>/dev/null) + local ver=$(uci get istorepanel.@main[0].ver 2>/dev/null) + + if [ -z "$config" ]; then + echo "config path is empty!" + exit 1 + fi + + [ -z "$port" ] && port=10086 + [ -z "$ver" ] && ver='v1.10.10-lts' + [ -z "$username" ] && username='1panel' + [ -z "$password" ] && password='password' + [ -z "$entrance" ] && entrance='entrance' + + mkdir -p $config + + cat >$config/env </dev/null) + ;; +*) + usage + exit 1 + ;; +esac