From owner-svn-ports-head@freebsd.org Sun Sep 17 01:43:08 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11BE0E181DE; Sun, 17 Sep 2017 01:43:08 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D29DB6C08D; Sun, 17 Sep 2017 01:43:07 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8H1h7OY076273; Sun, 17 Sep 2017 01:43:07 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8H1h66w076271; Sun, 17 Sep 2017 01:43:06 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201709170143.v8H1h66w076271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Sun, 17 Sep 2017 01:43:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r449980 - in head/sysutils/consul: . files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/sysutils/consul: . files X-SVN-Commit-Revision: 449980 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 01:43:08 -0000 Author: swills Date: Sun Sep 17 01:43:06 2017 New Revision: 449980 URL: https://svnweb.freebsd.org/changeset/ports/449980 Log: sysutils/consul: check config in rc.d script PR: 221732 Submitted by: thompsa Modified: head/sysutils/consul/Makefile head/sysutils/consul/files/consul.in Modified: head/sysutils/consul/Makefile ============================================================================== --- head/sysutils/consul/Makefile Sun Sep 17 01:34:38 2017 (r449979) +++ head/sysutils/consul/Makefile Sun Sep 17 01:43:06 2017 (r449980) @@ -2,6 +2,7 @@ PORTNAME= consul PORTVERSION= 0.9.3 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= sysutils Modified: head/sysutils/consul/files/consul.in ============================================================================== --- head/sysutils/consul/files/consul.in Sun Sep 17 01:34:38 2017 (r449979) +++ head/sysutils/consul/files/consul.in Sun Sep 17 01:43:06 2017 (r449980) @@ -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"