add dpanel (#538)

add dpanel (#538)

  • add dpanel

  • add logo for dpanel

  • add logo


Co-authored-by: Jason <xiaobao@linkease.com>
diff --git a/applications/app-meta-dpanel/Makefile b/applications/app-meta-dpanel/Makefile
new file mode 100644
index 0000000..e1b650b
--- /dev/null
+++ b/applications/app-meta-dpanel/Makefile
@@ -0,0 +1,21 @@
+# This is free software, licensed under the Apache License, Version 2.0 .
+
+include $(TOPDIR)/rules.mk
+
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=20251009
+META_TITLE:=dPanel 轻量化 Docker 可视化面板
+META_TITLE.en:=dPanel - lightweight docker management panel
+META_DEPENDS:=+luci-app-dpanel +luci-i18n-dpanel-zh-cn +docker-deps
+META_DESCRIPTION:=轻量化 docker 可视化管理面板。lightweight panel for docker
+META_DESCRIPTION.en:=A lightweight docker visual management panel.
+META_AUTHOR:=donknap
+META_TAGS:=net
+META_LUCI_ENTRY:=/cgi-bin/luci/admin/services/dpanel
+META_WEBSITE:=https://github.com/donknap/dpanel
+META_TUTORIAL:=https://doc.linkease.com/zh/guide/istore/software/dpanel.html
+
+include ../../meta.mk
+
+# call BuildPackage - OpenWrt buildroot signature
+
diff --git a/applications/app-meta-dpanel/config.sh b/applications/app-meta-dpanel/config.sh
new file mode 100644
index 0000000..7735efb
--- /dev/null
+++ b/applications/app-meta-dpanel/config.sh
@@ -0,0 +1,13 @@
+
+# Require a config directory to be provided by the installer environment
+[ -z "$ISTORE_CONF_DIR" ] && exit 1
+
+uci -q batch <<-EOF >/dev/null || exit 1
+	set dpanel.@main[0].config_path="$ISTORE_CONF_DIR/dpanel"
+	commit dpanel
+EOF
+
+ISTORE_ACTION=install
+[ -z "$ISTORE_DONT_START" ] || ISTORE_ACTION=stop
+
+/usr/libexec/dpanel/dpanel.sh $ISTORE_ACTION || [ stop = $ISTORE_ACTION ]
diff --git a/applications/app-meta-dpanel/entry.sh b/applications/app-meta-dpanel/entry.sh
new file mode 100644
index 0000000..735c85c
--- /dev/null
+++ b/applications/app-meta-dpanel/entry.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+ISTOREC_SCRIPT=/usr/libexec/dpanel/dpanel.sh
+
+status(){
+	local host="$1"
+	[ -n "$host" ] || host=127.0.0.1
+	. /usr/share/libubox/jshn.sh
+	json_init
+	json_add_string "app" "dpanel"
+	json_add_boolean "docker" "1"
+
+	local status=`$ISTOREC_SCRIPT status 2>/dev/null`
+	if [ "$status" = "running" ]; then
+		json_add_boolean "running" "1"
+		local port=`$ISTOREC_SCRIPT port`
+		local portsec=${port:-8807}
+		json_add_string "web" ":${portsec}"
+		json_add_string "href" "http://$host:${portsec}/"
+		json_add_string "protocol" http
+		json_add_string "port" ${portsec}
+	else
+		json_add_boolean "running" "0"
+		if [ -z "$status" ]; then
+			json_add_boolean "deployed" "0"
+		else
+			json_add_boolean "deployed" "1"
+		fi
+	fi
+
+	json_dump
+	json_cleanup >/dev/null
+}
+
+start(){
+	[ -z "`$ISTOREC_SCRIPT status`" ] && return 1
+	[ "`$ISTOREC_SCRIPT status`" = "running"] || $ISTOREC_SCRIPT start
+}
+
+stop(){
+	[ "`$ISTOREC_SCRIPT status`" != "running"] || $ISTOREC_SCRIPT stop
+}
+
+ACTION=${1}
+shift 1
+[ -z "${ACTION}" ] && ACTION=help
+
+case ${ACTION} in
+  "status" | "start" | "stop")
+	${ACTION} "$@"
+  ;;
+  *)
+	echo "Unknown Action" >&2
+	exit 1
+  ;;
+esac
diff --git a/applications/app-meta-dpanel/logo.png b/applications/app-meta-dpanel/logo.png
new file mode 100644
index 0000000..0733eb1
Binary files /dev/null and b/applications/app-meta-dpanel/logo.png differ

GitHub
sha: e8d3b4d040121257c32c21c22df0ba9402150882