diff options
| author | 2019-03-27 20:43:33 -0400 | |
|---|---|---|
| committer | 2019-03-27 20:43:33 -0400 | |
| commit | aac7fba8bb16c38e97e6809b8e0faa37fb299dfc (patch) | |
| tree | a6eb154ea5228798cfb2b7d7ac424bcad88ea234 /server | |
| parent | [client] new shell script (diff) | |
[server] Add openrc configuration
Diffstat (limited to 'server')
| -rw-r--r-- | server/brpaste.confd | 10 | ||||
| -rwxr-xr-x | server/brpaste.initd | 21 |
2 files changed, 31 insertions, 0 deletions
diff --git a/server/brpaste.confd b/server/brpaste.confd new file mode 100644 index 0000000..2755b94 --- /dev/null +++ b/server/brpaste.confd @@ -0,0 +1,10 @@ +BRPASTE_USER=nobody +BRPASTE_GROUP=nobody + +# defaults to localhost, set to :: to listen on all +#BRPASTE_IP=:: +#BRPASTE_PORT=8080 + +# if your redis is listening on a different address +# accepts redis:// style strings +#BRPASTE_REDIS= diff --git a/server/brpaste.initd b/server/brpaste.initd new file mode 100755 index 0000000..ab024b0 --- /dev/null +++ b/server/brpaste.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +supervisor=supervise-daemon + +healthcheck_timer=30 +respawn_delay=30 + +command=/usr/bin/brpaste +command_args="\ + ${BRPASTE_USER:+--uid $BRPASTE_USER} ${BRPASTE_GROUP:+--gid $BRPASTE_GROUP} \ + ${BRPASTE_REDIS:+-r $BRPASTE_REDIS} \ + ${BRPASTE_IP:+-b $BRPASTE_IP} ${BRPASTE_PORT:+-p $BRPASTE_PORT}" + +depend() { + need redis +} + +health() { + curl -s "${BRPASTE_IP:-localhost}:${BRPASTE_PORT:-8080}/health" +} + +unhealthy() {} |
