diff --git a/applications/luci-app-typecho/luasrc/model/cbi/typecho.lua b/applications/luci-app-typecho/luasrc/model/cbi/typecho.lua index 910ee9aa..af6c4467 100644 --- a/applications/luci-app-typecho/luasrc/model/cbi/typecho.lua +++ b/applications/luci-app-typecho/luasrc/model/cbi/typecho.lua @@ -34,7 +34,6 @@ s.anonymous=true o = s:option(Value, "port", translate("Port").."*") o.default = "9080" o.datatype = "port" -o:depends("hostnet", 0) o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false diff --git a/applications/luci-app-typecho/luasrc/view/typecho/status.htm b/applications/luci-app-typecho/luasrc/view/typecho/status.htm index 80a62e07..7dc1d4d6 100644 --- a/applications/luci-app-typecho/luasrc/view/typecho/status.htm +++ b/applications/luci-app-typecho/luasrc/view/typecho/status.htm @@ -25,7 +25,7 @@
- +
<% end %> diff --git a/applications/luci-app-typecho/root/etc/config/typecho b/applications/luci-app-typecho/root/etc/config/typecho index ec8adcd8..8feb9f5f 100644 --- a/applications/luci-app-typecho/root/etc/config/typecho +++ b/applications/luci-app-typecho/root/etc/config/typecho @@ -1,6 +1,4 @@ config main - option 'hostnet' '0' - option 'claim_token' '' option 'port' '9080' option 'config_path' '' diff --git a/applications/luci-app-typecho/root/usr/libexec/istorec/typecho.sh b/applications/luci-app-typecho/root/usr/libexec/istorec/typecho.sh index 4689f8fd..ea539188 100755 --- a/applications/luci-app-typecho/root/usr/libexec/istorec/typecho.sh +++ b/applications/luci-app-typecho/root/usr/libexec/istorec/typecho.sh @@ -13,7 +13,6 @@ do_install() { echo "config path is empty!" exit 1 fi - [ -z "$image_name" ] && image_name="joyqi/typecho:nightly-php7.4" echo "docker pull ${image_name}" docker pull ${image_name} @@ -21,7 +20,9 @@ do_install() { [ -z "$port" ] && port=9080 - local cmd="docker run --restart=unless-stopped -d -h TypeChoServer -v \"$config:/config\" " + mkdir -p $config + chmod 777 $config + local cmd="docker run --restart=unless-stopped -d -h TypeChoServer -v \"$config:/app/usr\" " cmd="$cmd\ --dns=172.17.0.1 \ @@ -29,6 +30,7 @@ do_install() { local tz="`uci get system.@system[0].zonename | sed 's/ /_/g'`" [ -z "$tz" ] || cmd="$cmd -e TZ=$tz" + cmd="$cmd -v /mnt:/mnt" mountpoint -q /mnt && cmd="$cmd:rslave" cmd="$cmd --name typecho \"$image_name\""