verysync add profiledir config (#3612)

This commit is contained in:
22613 2020-03-07 00:41:37 +08:00 committed by GitHub
parent 6db2e387a8
commit e304e1dbc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -6,3 +6,6 @@ msgstr "简单易用的多平台文件同步软件, 惊人的传输速度是不
msgid "Open Verysync page"
msgstr "打开微力同步页面"
msgid "Store configuration files in the Path"
msgstr "配置文件存放路径"

View File

@ -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() {