Open
Description
Is your feature request related to a problem? Please describe.
I'm running soft-serve on Alpine, and there's no documentation for an OpenRC file to run it as a service.
Describe the solution you'd like
It would be great to have a simple starter config file, or even a guide like the one for systemd. It shouldn't be too hard, really you just have to move around some syntax.
Describe alternatives you've considered
- Tell people not to use OpenRC lol
- Some kind of crontab shenanigans?
Additional context
I have a service file that I'm using for OpenRC. I'd be perfectly willing to write a guide for it, but I'd like to have someone take a look at it first to make sure there aren't any glaring flaws. It's my first time writing an OpenRC script so I'm not sure if there's more that could be done.
/etc/init.d/soft-serve
#!/sbin/openrc-run
name="Soft Serve"
description="Soft Serve - A self-hostable Git server"
command="/usr/bin/soft" # Path to the Soft Serve binary
command_args="serve >> /var/log/soft-serve.log 2>&1"
command_user="<username>" # Replace with the user under which you want Soft Serve to run
command_background="true"
pidfile="/run/soft-serve.pid"
depend() {
need net
}
start_pre() {
# Export the environment variable before starting the service
export SOFT_SERVE_DATA_PATH="/var/lib/soft-serve"
}
Metadata
Assignees
Labels
No labels