James Tombleson
b7facd7394
Added Sensu Moved default role downloads to ./roles Added unattended-upgrades
28 lines
585 B
Django/Jinja
28 lines
585 B
Django/Jinja
#!/bin/sh
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=uchiwa
|
|
rcvar=uchiwa_enable
|
|
|
|
command="{{ sensu_uchiwa_path }}/go/bin/${name}"
|
|
uchiwa_flags="-d {{ sensu_uchiwa_path }} -c {{ sensu_uchiwa_path }}/etc/config.json -p {{ sensu_uchiwa_path }}/go/src/github.com/sensu/uchiwa/public"
|
|
|
|
load_rc_config $name
|
|
|
|
pidfile=/var/run/${name}.pid
|
|
start_cmd=uchiwa_start
|
|
stop_postcmd=uchiwa_cleanup
|
|
|
|
uchiwa_start() {
|
|
echo "Starting uchiwa."
|
|
/usr/bin/touch ${pidfile}
|
|
/usr/sbin/daemon -cf -p ${pidfile} ${command} ${uchiwa_flags}
|
|
}
|
|
|
|
uchiwa_cleanup() {
|
|
[ -f ${pidfile} ] && /bin/rm ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|