From owner-svn-ports-head@freebsd.org Thu Jul 25 03:36:37 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45CF8C19F3; Thu, 25 Jul 2019 03:36:37 +0000 (UTC) (envelope-from jhixson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E3018C4EE; Thu, 25 Jul 2019 03:36:37 +0000 (UTC) (envelope-from jhixson@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EE4F20C09; Thu, 25 Jul 2019 03:36:36 +0000 (UTC) (envelope-from jhixson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6P3aax0000130; Thu, 25 Jul 2019 03:36:36 GMT (envelope-from jhixson@FreeBSD.org) Received: (from jhixson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6P3aaml000128; Thu, 25 Jul 2019 03:36:36 GMT (envelope-from jhixson@FreeBSD.org) Message-Id: <201907250336.x6P3aaml000128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhixson set sender to jhixson@FreeBSD.org using -f From: John Hixson Date: Thu, 25 Jul 2019 03:36:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r507310 - in head/sysutils/nomad: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jhixson X-SVN-Commit-Paths: in head/sysutils/nomad: . files X-SVN-Commit-Revision: 507310 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0E3018C4EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 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: Thu, 25 Jul 2019 03:36:37 -0000 Author: jhixson Date: Thu Jul 25 03:36:35 2019 New Revision: 507310 URL: https://svnweb.freebsd.org/changeset/ports/507310 Log: sysutils/nomad: add nomad_debug rc flag to log to syslog if enabled PR: 239124 Submitted by: tara@anne.cat Modified: head/sysutils/nomad/Makefile head/sysutils/nomad/files/nomad.in Modified: head/sysutils/nomad/Makefile ============================================================================== --- head/sysutils/nomad/Makefile Thu Jul 25 02:34:20 2019 (r507309) +++ head/sysutils/nomad/Makefile Thu Jul 25 03:36:35 2019 (r507310) @@ -3,6 +3,7 @@ PORTNAME= nomad DISTVERSIONPREFIX= v DISTVERSION= 0.9.3 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= jhixson@FreeBSD.org Modified: head/sysutils/nomad/files/nomad.in ============================================================================== --- head/sysutils/nomad/files/nomad.in Thu Jul 25 02:34:20 2019 (r507309) +++ head/sysutils/nomad/files/nomad.in Thu Jul 25 03:36:35 2019 (r507310) @@ -9,8 +9,10 @@ # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # -# nomad_enable (bool): Set to NO by default. -# Set it to YES to enable nomad. +# nomad_enable (bool): Set to NO by default. +# Set it to YES to enable nomad. +# nomad_debug (bool): Set to NO by default. +# Set it to YES to enable nomad debugging to syslog. # nomad_user (user): Set user to run nomad. # Default is "nomad". # nomad_group (group): Set group to run nomad. @@ -28,6 +30,7 @@ rcvar=nomad_enable load_rc_config $name : ${nomad_enable:="NO"} +: ${nomad_debug:="NO"} : ${nomad_user:="nomad"} : ${nomad_group:="nomad"} : ${nomad_dir:="/var/tmp/nomad"} @@ -36,20 +39,23 @@ load_rc_config $name pidfile=/var/run/nomad.pid procname="%%PREFIX%%/bin/nomad" command="/usr/sbin/daemon" -command_args="-f -p ${pidfile} /usr/bin/env ${nomad_env} ${procname} agent -data-dir=${nomad_dir} ${nomad_args}" +nomad_command="/usr/bin/env ${nomad_env} ${procname} agent -data-dir=${nomad_dir} ${nomad_args}" +command_args="-f -p ${pidfile} ${nomad_command}" start_precmd=nomad_startprecmd nomad_startprecmd() { - if [ ! -e ${pidfile} ]; then - install -o ${nomad_user} -g ${nomad_group} /dev/null ${pidfile}; - fi + if [ ! -e ${pidfile} ]; then + install -o ${nomad_user} -g ${nomad_group} /dev/null ${pidfile}; + fi - if [ ! -d ${nomad_dir} ]; then - install -d -o ${nomad_user} -g ${nomad_group} ${nomad_dir} - fi - + if [ ! -d ${nomad_dir} ]; then + install -d -o ${nomad_user} -g ${nomad_group} ${nomad_dir} + fi + if [ "${nomad_debug}" != "NO" ]; then + command_args="-S -T ${name} -p ${pidfile} ${nomad_command}" + fi } run_rc_command "$1"