op-packages/luci-app-verysync/root/etc/init.d/verysync
github-actions[bot] 32600acc60 🌴 Sync 2026-03-05 23:51:42
2026-03-05 23:51:42 +08:00

21 lines
486 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=50
STOP=10
VERYSYNC="/usr/bin/verysync"
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="${profile}" -no-browser >/dev/null 2>&1 &
}
stop() {
kill -9 `pgrep "${VERYSYNC}"` >/dev/null 2>&1
}