~yerinalexey/gobin

63dfcb48e76116d99c5ed9c894df071fa4285b1d — Alexey Yerin 5 months ago 478164c
contrib: add OpenRC scripts
2 files changed, 20 insertions(+), 0 deletions(-)

A contrib/openrc/gobin.confd
A contrib/openrc/gobin.initd
A contrib/openrc/gobin.confd => contrib/openrc/gobin.confd +5 -0
@@ 0,0 1,5 @@
# Set path to configuration file
GOBIN_CONFIG=/etc/gobin/config.toml

# Use a different binary
# GOBIN_CMD=/usr/bin/gobin

A contrib/openrc/gobin.initd => contrib/openrc/gobin.initd +15 -0
@@ 0,0 1,15 @@
#!/usr/bin/openrc-run

LOGS="/var/log/${RC_SVCNAME}.log"

command="${GOBIN_CMD:-/usr/bin/gobin}"
command_args="-config ${GOBIN_CONFIG} -log ${LOGS}"
pidfile="/run/${RC_SVCNAME}.pid"
supervisor=supervise-daemon # Without this rc-service gobin start freezes

depend() {
  need net
  use postgresql

  provide gobin
}