mirror of
https://git.freebsd.org/ports.git
synced 2025-06-06 13:20:32 -04:00
36 lines
931 B
Bash
36 lines
931 B
Bash
#!/bin/sh
|
|
|
|
# Goss startup script
|
|
#
|
|
# PROVIDE: goss
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following to /etc/rc.conf[.local] to enable this service
|
|
#
|
|
# goss_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable goss
|
|
# goss_conf (string): Set to %%PREFIX%%/etc/goss.yaml by default
|
|
# Set it to preferred config file
|
|
# goss_listen (string): Set to ":12345" by default
|
|
# Set it to preferred listen address
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=goss
|
|
rcvar=goss_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${goss_enable:="NO"}
|
|
: ${goss_listen="127.0.0.1:12345"}
|
|
: ${goss_conf="%%PREFIX%%/etc/goss.yaml"}
|
|
|
|
required_files=${goss_conf}
|
|
pidfile=/var/run/${name}.pid
|
|
procname="%%PREFIX%%/bin/goss"
|
|
command="/usr/sbin/daemon"
|
|
command_args="-f -p ${pidfile} /usr/bin/env ${goss_env} ${procname} -g ${goss_conf} serve -l ${goss_listen}"
|
|
|
|
run_rc_command "$1"
|