From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jun 24 17:50:08 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0FA6E106567C for ; Sun, 24 Jun 2012 17:50:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D9EF28FC0A for ; Sun, 24 Jun 2012 17:50:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5OHo7x3095523 for ; Sun, 24 Jun 2012 17:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5OHo7aM095522; Sun, 24 Jun 2012 17:50:07 GMT (envelope-from gnats) Resent-Date: Sun, 24 Jun 2012 17:50:07 GMT Resent-Message-Id: <201206241750.q5OHo7aM095522@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Wollman Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58EC2106567A for ; Sun, 24 Jun 2012 17:44:31 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (wollman-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:ccb::2]) by mx1.freebsd.org (Postfix) with ESMTP id E03E28FC14 for ; Sun, 24 Jun 2012 17:44:30 +0000 (UTC) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.5/8.14.5) with ESMTP id q5OHiTho036435 for ; Sun, 24 Jun 2012 13:44:29 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.5/8.14.4/Submit) id q5OHiTFb036434; Sun, 24 Jun 2012 13:44:29 -0400 (EDT) (envelope-from wollman) Message-Id: <201206241744.q5OHiTFb036434@hergotha.csail.mit.edu> Date: Sun, 24 Jun 2012 13:44:29 -0400 (EDT) From: Garrett Wollman To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/169380: [security/sshguard] no startup script for sshguard X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Wollman List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2012 17:50:08 -0000 >Number: 169380 >Category: ports >Synopsis: [security/sshguard] no startup script for sshguard >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jun 24 17:50:07 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Garrett Wollman >Release: FreeBSD 8.3-RELEASE-p1 amd64 >Organization: MIT Computer Science & Artificial Intelligence Laboratory >Environment: not really relevant >Description: Since the release of version 1.5, sshguard is now capable of reading directly from log files as a daemon rather than being started from syslogd. It would be good to give users that optino by installing a startup script. >How-To-Repeat: Install sshguard from ports. >Fix: Here's a total hack of a startup script. # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # sshguard # echo x - sshguard sed 's/^X//' >sshguard << '221c5acbd2946333e46a21ddc354393f' X#!/bin/sh X# X# based on: FreeBSD: ports/sysutils/monit/files/monit.sh.in,v 1.5 2012/01/14 08:57:02 dougb Exp X# X X# PROVIDE: sshguard X# REQUIRE: SERVERS X# BEFORE: LOGIN X# KEYWORD: shutdown X X# X# Add the following lines to /etc/rc.conf to enable sshguard: X# sshguard_enable (bool): Set to "NO" by default. X# Set it to "YES" to enable sshguard X# sshguard_flags (str): Flags passed to sshguard on startup. X# Default is "-l /var/log/auth.log". X# X. /etc/rc.subr X Xname="sshguard" Xrcvar=sshguard_enable X X: ${sshguard_enable:="NO"} X: ${sshguard_flags:="-l /var/log/auth.log"} X Xload_rc_config $name X Xcommand="/usr/local/sbin/sshguard" Xcommand_args="-i /var/run/sshguard.pid" Xpidfile="/var/run/sshguard.pid" Xstart_cmd="dostart" X X# Grrr... boilerplate copied from rc.subr so that we can call daemon(8) X# to daemonize this ill-behaved daemon. Xdostart() { X if [ -z "$rc_fast" -a -n "$rc_pid" ]; then X echo 1>&2 "${name} already running? (pid=$rc_pid)." X return 1 X fi X X check_startmsgs && echo "Starting ${name}." X if ! _run_rc_doit "daemon $command $rc_flags $command_args"; then X warn "failed to start ${name}" X return 1 X fi X return 0 X} X Xrun_rc_command "$1" 221c5acbd2946333e46a21ddc354393f exit >Release-Note: >Audit-Trail: >Unformatted: