mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-02 06:19:14 +08:00

Fixes: 0c612f1
("add webdav")
1. use release to download the source
2. fix wrong package license
3. fix whitespace issue
23 lines
379 B
Bash
23 lines
379 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2021 ImmortalWrt
|
|
|
|
START=90
|
|
STOP=10
|
|
|
|
WEBDAV="/usr/bin/webdav"
|
|
|
|
WEBDAVCONFIG="/etc/webdav/webdav.yaml"
|
|
|
|
start() {
|
|
local enabled="$(uci get webdav.config.enabled)"
|
|
stop
|
|
[ "${enabled}" == "1" ] || exit 0
|
|
export HOME="/root/"
|
|
"${WEBDAV}" -c "${WEBDAVCONFIG}" >/dev/null 2>&1 &
|
|
}
|
|
|
|
stop() {
|
|
killall -9 pgrep "${WEBDAV}" >/dev/null 2>&1
|
|
}
|
|
|