From e304e1dbc039650ad6ba3fc6047eeb244564863e Mon Sep 17 00:00:00 2001 From: 22613 Date: Sat, 7 Mar 2020 00:41:37 +0800 Subject: [PATCH] verysync add profiledir config (#3612) --- package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua | 3 +++ package/lean/luci-app-verysync/po/zh-cn/verysync.po | 3 +++ package/lean/luci-app-verysync/root/etc/init.d/verysync | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua b/package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua index f8bfd26bb2..097d6f1885 100644 --- a/package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua +++ b/package/lean/luci-app-verysync/luasrc/model/cbi/verysync.lua @@ -21,4 +21,7 @@ o.placeholder = "8886" o.default = "8886" o.rmempty = false +o = s:option(Value, "profile", translate("Store configuration files in the Path")) +o.default = '/etc/verysync/' + return m diff --git a/package/lean/luci-app-verysync/po/zh-cn/verysync.po b/package/lean/luci-app-verysync/po/zh-cn/verysync.po index 30b23ea829..647e401ff4 100644 --- a/package/lean/luci-app-verysync/po/zh-cn/verysync.po +++ b/package/lean/luci-app-verysync/po/zh-cn/verysync.po @@ -6,3 +6,6 @@ msgstr "简单易用的多平台文件同步软件, 惊人的传输速度是不 msgid "Open Verysync page" msgstr "打开微力同步页面" + +msgid "Store configuration files in the Path" +msgstr "配置文件存放路径" diff --git a/package/lean/luci-app-verysync/root/etc/init.d/verysync b/package/lean/luci-app-verysync/root/etc/init.d/verysync index a3a5bcc5db..146ddc3506 100755 --- a/package/lean/luci-app-verysync/root/etc/init.d/verysync +++ b/package/lean/luci-app-verysync/root/etc/init.d/verysync @@ -6,10 +6,11 @@ STOP=10 start() { local enabled="$(uci get verysync.config.enabled)" local port="$(uci get verysync.config.port)" + local profile="$(uci get verysync.config.profile)" stop [ "${enabled}" == "1" ] || exit 0 export HOME="/root/" - verysync -gui-address="0.0.0.0:${port}" -logfile="/var/log/verysync.log" -home="/etc/verysync/" -no-browser >/dev/null 2>&1 & + verysync -gui-address="0.0.0.0:${port}" -logfile="/var/log/verysync.log" -home="${profile}" -no-browser >/dev/null 2>&1 & } stop() {