add kaiplus (#654)
-
add kaiplus
-
update version
Co-authored-by: jannson <jannon.wei@gmail.com>
diff --git a/applications/app-meta-kaiplus/Makefile b/applications/app-meta-kaiplus/Makefile
new file mode 100644
index 0000000..1792b43
--- /dev/null
+++ b/applications/app-meta-kaiplus/Makefile
@@ -0,0 +1,22 @@
+# This is free software, licensed under the Apache License, Version 2.0 .
+
+include $(TOPDIR)/rules.mk
+
+PKG_VERSION:=1.0.5
+PKG_RELEASE:=1
+META_TITLE:=KaiPlus
+META_TITLE.en:=KaiPlus
+META_DEPENDS:=+luci-app-kaiplus +kaiplus
+META_DESCRIPTION:=KaiPlus AI 工作台(iStoreOS 24版本以上适用)
+META_DESCRIPTION.en:=KaiPlus AI workspace
+META_AUTHOR:=koolcenter
+META_ARCH:=x86_64 aarch64
+META_TAGS:=system ai
+META_LUCI_ENTRY:=/cgi-bin/luci/admin/services/kaiplus
+META_WEBSITE:=https://ai.koolcenter.com
+META_AUTOCONF:=path enable
+META_UCI:=kaiplus
+
+include ../../meta.mk
+
+# call BuildPackage - OpenWrt buildroot signature
diff --git a/applications/app-meta-kaiplus/config.sh b/applications/app-meta-kaiplus/config.sh
new file mode 100644
index 0000000..485626b
--- /dev/null
+++ b/applications/app-meta-kaiplus/config.sh
@@ -0,0 +1,19 @@
+
+[ -z "$ISTORE_CONF_DIR" ] && exit 1
+
+ENABLED=1
+if [ -n "$ISTORE_DONT_START" ]; then
+ ENABLED=0
+fi
+
+mkdir -p "$ISTORE_CONF_DIR/KAIPlus" || exit 1
+
+uci -q batch <<-EOF >/dev/null || exit 1
+ set kaiplus.@kaiplus[0].enabled=$ENABLED
+ set kaiplus.@kaiplus[0].data_dir="$ISTORE_CONF_DIR/KAIPlus"
+ set kaiplus.@kaiplus[0].port="8198"
+ set kaiplus.@kaiplus[0].system_role="istoreos"
+ commit kaiplus
+EOF
+
+/etc/init.d/kaiplus restart || true
diff --git a/applications/app-meta-kaiplus/entry.sh b/applications/app-meta-kaiplus/entry.sh
new file mode 100644
index 0000000..6b0f361
--- /dev/null
+++ b/applications/app-meta-kaiplus/entry.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+status(){
+ local host="$1"
+ [ -n "$host" ] || host=127.0.0.1
+ . /usr/share/libubox/jshn.sh
+ json_init
+ json_add_string "app" "kaiplus"
+ json_add_boolean "docker" "0"
+
+ local port
+ port="$(uci get kaiplus.@kaiplus[0].port 2>/dev/null)"
+ local portsec=${port:-8198}
+
+ if pidof kaiplus_bin >/dev/null 2>&1; then
+ json_add_boolean "running" "1"
+ json_add_string "web" ":${portsec}"
+ json_add_string "href" "http://$host:${portsec}/"
+ json_add_string "protocol" http
+ json_add_string "port" "${portsec}"
+ json_add_boolean "deployed" "1"
+ else
+ json_add_boolean "running" "0"
+ if [ -x /etc/init.d/kaiplus ]; then
+ json_add_boolean "deployed" "1"
+ else
+ json_add_boolean "deployed" "0"
+ fi
+ fi
+
+ json_dump
+ json_cleanup >/dev/null
+}
+
+start(){
+ /etc/init.d/kaiplus start
+}
+
+stop(){
+ /etc/init.d/kaiplus 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-kaiplus/logo.png b/applications/app-meta-kaiplus/logo.png
new file mode 100644
index 0000000..56477b1
Binary files /dev/null and b/applications/app-meta-kaiplus/logo.png differ
GitHub
sha: 14eaea1e6f7e22d95344c9614bb6802cff66d15d