mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-30 06:55:13 +08:00
1 parent
37eb246de8
commit
ec44f6fe2e
16 files changed
+130
-275
No files matched your search
@@ -16,7 +16,7 @@ start() {
|
||||
[ "$enabled" -eq "1" ] || return 1
|
||||
|
||||
local listen_port root_path root_name
|
||||
config_get listen_port "config" "listen_port" "8989"
|
||||
config_get listen_port "config" "listen_port" "8787"
|
||||
config_get root_path "config" "root_path" "/"
|
||||
|
||||
# 路径为 / 时 name 设为 root,否则留空
|
||||
@@ -43,9 +43,9 @@ userDefaults:
|
||||
EOF
|
||||
else
|
||||
grep -q " name:" "$CONF_PATH" || sed -i "s,.*- path:.*,&\n name: \"\"," "$CONF_PATH"
|
||||
sed -e "s/.*port:.*/ port: $listen_port/" \
|
||||
-e "s,.*- path:.*, - path: \"$root_path\"," \
|
||||
-e "s/.*name:.*/ name: \"$root_name\"/" \
|
||||
sed -e "s/ port:.*/ port: $listen_port/" \
|
||||
-e "s, - path:.*, - path: \"$root_path\"," \
|
||||
-e "s/ name: \".*\"/ name: \"$root_name\"/" \
|
||||
-i "$CONF_PATH"
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user