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
Reviewed-on: #21
60 lines
1.6 KiB
Markdown
60 lines
1.6 KiB
Markdown
# rclone OpenRC Alpine Package
|
|
|
|
Provides a generic, instance-capable OpenRC service for Alpine's `rclone`
|
|
package. It does not repackage the rclone binary.
|
|
|
|
## Install
|
|
|
|
```sh
|
|
apk add rclone-openrc
|
|
```
|
|
|
|
The package creates the unprivileged `rclone` account, `/etc/rclone` for
|
|
configuration and credentials, and `/var/lib/rclone/cache` for rclone state.
|
|
It deliberately does not create remotes, credentials, authorized-key files, or
|
|
SSH host keys; provision those as machine-specific secrets.
|
|
|
|
## Create an Instance
|
|
|
|
Copy the template and symlink the generic service under an instance name:
|
|
|
|
```sh
|
|
cp /etc/conf.d/rclone /etc/conf.d/rclone.sftp
|
|
ln -s rclone /etc/init.d/rclone.sftp
|
|
```
|
|
|
|
For an SFTP server, configure `/etc/conf.d/rclone.sftp`:
|
|
|
|
```sh
|
|
RCLONE_COMMAND="serve sftp"
|
|
RCLONE_REMOTE="/srv/storage"
|
|
RCLONE_ARGS="
|
|
--addr :2022
|
|
--authorized-keys /etc/rclone/authorized_keys
|
|
--key /etc/rclone/ssh_host_ed25519_key
|
|
--log-level INFO
|
|
"
|
|
```
|
|
|
|
Then enable and start it:
|
|
|
|
```sh
|
|
rc-update add rclone.sftp default
|
|
rc-service rclone.sftp start
|
|
```
|
|
|
|
Other instances, such as `rclone.webdav` or `rclone.rcd`, use their own
|
|
`/etc/conf.d/rclone.<name>` file with the same generic init script. The service
|
|
runs rclone in the foreground under `supervise-daemon`, which restarts it after
|
|
an unexpected exit. Set `RCLONE_RESPAWN_MAX` to a positive value to limit
|
|
restart attempts.
|
|
|
|
## Package Commands
|
|
|
|
```sh
|
|
ALPINE_PACKAGE=rclone-openrc mise run apk:checksum
|
|
ALPINE_PACKAGE=rclone-openrc mise run apk:build
|
|
ALPINE_PACKAGE=rclone-openrc SKIP_BUILD=1 mise run apk:test-install
|
|
ALPINE_PACKAGE=rclone-openrc mise run apk:runtime-test
|
|
```
|