Files
alpine-packages/packaging/alpine/local/rclone-openrc/rclone.initd
T
fspjo 29c79708f1
Build Alpine Packages / preflight (pull_request) Successful in 7s
Build Alpine Packages / build (gitea) (pull_request) Successful in 3s
Build Alpine Packages / build (greptimedb) (pull_request) Successful in 3s
Build Alpine Packages / build (lavinmq) (pull_request) Successful in 4s
Build Alpine Packages / build (nifi) (pull_request) Successful in 3s
Build Alpine Packages / build (rclone-openrc) (pull_request) Successful in 9s
Build Alpine Packages / build (seaweedfs) (pull_request) Successful in 3s
Build Alpine Packages / verify-and-publish (pull_request) Successful in 27s
Build Alpine Packages / preflight (push) Failing after 5s
Build Alpine Packages / build (gitea) (push) Skipped
Build Alpine Packages / build (greptimedb) (push) Skipped
Build Alpine Packages / build (lavinmq) (push) Skipped
Build Alpine Packages / build (nifi) (push) Skipped
Build Alpine Packages / build (rclone-openrc) (push) Skipped
Build Alpine Packages / build (seaweedfs) (push) Skipped
Build Alpine Packages / verify-and-publish (push) Skipped
add rclone-openrc (#21)
Reviewed-on: #21
2026-10-07 14:24:24 +02:00

32 lines
956 B
Plaintext

#!/sbin/openrc-run
instance_name="${RC_SVCNAME#rclone.}"
description="rclone ${instance_name} service"
supervisor="supervise-daemon"
command="/usr/bin/rclone"
command_user="${RCLONE_USER:-rclone}:${RCLONE_GROUP:-rclone}"
pidfile="/run/rclone/${RC_SVCNAME}.pid"
respawn_delay="${RCLONE_RESPAWN_DELAY:-5}"
respawn_max="${RCLONE_RESPAWN_MAX:-0}"
supervise_daemon_args="--chdir /var/lib/rclone --pidfile ${pidfile}"
command_args="${RCLONE_COMMAND:-} ${RCLONE_REMOTE:-} --config ${RCLONE_CONFIG:-/etc/rclone/rclone.conf} --cache-dir ${RCLONE_CACHE_DIR:-/var/lib/rclone/cache} ${RCLONE_ARGS:-}"
depend() {
need net
use dns logger
}
start_pre() {
local service_owner="${RCLONE_USER:-rclone}:${RCLONE_GROUP:-rclone}"
if [ -z "${RCLONE_COMMAND:-}" ]; then
eerror "RCLONE_COMMAND is required; configure /etc/conf.d/${RC_SVCNAME}"
return 1
fi
checkpath -d -m 0750 -o "$service_owner" \
/run/rclone \
"${RCLONE_CACHE_DIR:-/var/lib/rclone/cache}"
}