diff options
author | swills <swills@FreeBSD.org> | 2017-09-17 09:43:06 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2017-09-17 09:43:06 +0800 |
commit | f071bac9eef121121befefcc73441c9743730c7c (patch) | |
tree | 196375dc83334dcfb372edc2ae88142bc8be89a2 /sysutils | |
parent | 3e504d89936c9bd6f6eacebf09aac17920c02398 (diff) | |
download | freebsd-ports-gnome-f071bac9eef121121befefcc73441c9743730c7c.tar.gz freebsd-ports-gnome-f071bac9eef121121befefcc73441c9743730c7c.tar.zst freebsd-ports-gnome-f071bac9eef121121befefcc73441c9743730c7c.zip |
sysutils/consul: check config in rc.d script
PR: 221732
Submitted by: thompsa
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/consul/Makefile | 1 | ||||
-rw-r--r-- | sysutils/consul/files/consul.in | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sysutils/consul/Makefile b/sysutils/consul/Makefile index 1b5cd8076262..539bb616a094 100644 --- a/sysutils/consul/Makefile +++ b/sysutils/consul/Makefile @@ -2,6 +2,7 @@ PORTNAME= consul PORTVERSION= 0.9.3 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= sysutils diff --git a/sysutils/consul/files/consul.in b/sysutils/consul/files/consul.in index 39b829fe1d9c..0387e00e590c 100644 --- a/sysutils/consul/files/consul.in +++ b/sysutils/consul/files/consul.in @@ -22,7 +22,7 @@ name=consul rcvar=consul_enable -extra_commands="reload" +extra_commands="reload configtest" load_rc_config $name @@ -37,6 +37,10 @@ command="/usr/sbin/daemon" command_args="-f -p ${pidfile} /usr/bin/env ${consul_env} ${procname} agent -data-dir=${consul_dir} -config-dir=%%PREFIX%%/etc/consul.d ${consul_args}" start_precmd=consul_startprecmd +restart_precmd=consul_checkconfig +reload_precmd=consul_checkconfig +configtest_cmd=consul_checkconfig +upgrade_precmd=consul_checkconfig consul_startprecmd() { @@ -47,7 +51,12 @@ consul_startprecmd() if [ ! -d ${consul_dir} ]; then install -d -o ${consul_user} -g ${consul_group} ${consul_dir} fi + consul_checkconfig +} +consul_checkconfig() +{ + ${procname} validate /usr/local/etc/consul.d } run_rc_command "$1" |