svn commit: r507310 - in head/sysutils/nomad: . files
John Hixson
jhixson at FreeBSD.org
Thu Jul 25 03:36:37 UTC 2019
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 at 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 at 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"
More information about the svn-ports-all
mailing list