diff --git a/applications/app-meta-ubuntu/Makefile b/applications/app-meta-ubuntu/Makefile index 530e5e1..0aefc57 100644 --- a/applications/app-meta-ubuntu/Makefile +++ b/applications/app-meta-ubuntu/Makefile @@ -6,7 +6,7 @@ PKG_VERSION:=1.0.10 PKG_RELEASE:=20241216 META_TITLE:=Ubuntu META_DEPENDS:=+luci-app-ubuntu2 +luci-i18n-ubuntu2-zh-cn +docker-deps -META_DESCRIPTION:=带Web远程桌面的Docker版Ubuntu,纯英文系统,欢迎各位极客玩家享用。 +META_DESCRIPTION:=带Web远程桌面的高性能Docker版Ubuntu。 META_DESCRIPTION.en=Ubuntu2 is a high-Performance ubuntu with web remote desktop. META_AUTHOR:=xiaobao META_TAGS:=system tool diff --git a/applications/app-meta-webvirtcloud/Makefile b/applications/app-meta-webvirtcloud/Makefile index 06c0baa..ca003c3 100644 --- a/applications/app-meta-webvirtcloud/Makefile +++ b/applications/app-meta-webvirtcloud/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=0.3.9 +PKG_VERSION:=0.8.5 PKG_RELEASE:=1 META_TITLE:=KVM虚拟机(WebVirtCloud) META_DEPENDS:=+vmease +luci-app-webvirtcloud +luci-i18n-webvirtcloud-zh-cn +docker-deps @@ -13,6 +13,8 @@ META_TAGS:=system tool META_ARCH:=x86_64 META_LUCI_ENTRY:=/cgi-bin/luci/admin/services/webvirtcloud META_WEBSITE:=https://webvirt.cloud/ +META_AUTOCONF:=path enable +META_UCI:=webvirtcloud include ../../meta.mk diff --git a/applications/app-meta-webvirtcloud/config.sh b/applications/app-meta-webvirtcloud/config.sh new file mode 100755 index 0000000..a78192f --- /dev/null +++ b/applications/app-meta-webvirtcloud/config.sh @@ -0,0 +1,12 @@ + +[ -z "$ISTORE_CONF_DIR" ] && exit 1 + +uci -q batch <<-EOF >/dev/null || exit 1 + set webvirtcloud.@webvirtcloud[0].config_path="$ISTORE_CONF_DIR/WebVirtCloud" + commit webvirtcloud +EOF + +ISTORE_ACTION=install +[ -z "$ISTORE_DONT_START" ] || ISTORE_ACTION=stop + +/usr/libexec/istorec/webvirtcloud.sh $ISTORE_ACTION diff --git a/applications/app-meta-webvirtcloud/entry.sh b/applications/app-meta-webvirtcloud/entry.sh new file mode 100755 index 0000000..d2f3897 --- /dev/null +++ b/applications/app-meta-webvirtcloud/entry.sh @@ -0,0 +1,57 @@ +#!/bin/sh + +ISTOREC_SCRIPT=/usr/libexec/istorec/webvirtcloud.sh + +status(){ + local host="$1" + [ -n "$host" ] || host=127.0.0.1 + . /usr/share/libubox/jshn.sh + json_init + json_add_string "app" "webvirtcloud" + 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:-6009} + 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`" ] && $ISTOREC_SCRIPT install && sleep 5 + [ -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