From owner-freebsd-ports@freebsd.org Fri Sep 11 14:51:23 2015 Return-Path: Delivered-To: freebsd-ports@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 2A3E0A0191C for ; Fri, 11 Sep 2015 14:51:23 +0000 (UTC) (envelope-from kpg@caomhin.org) Received: from kif.compliantgroup.com (kif.compliantgroup.com [198.245.60.218]) by mx1.freebsd.org (Postfix) with ESMTP id 0504E1974 for ; Fri, 11 Sep 2015 14:51:22 +0000 (UTC) (envelope-from kpg@caomhin.org) Received: from kif.compliantgroup.com (localhost [127.0.0.1]) by kif.compliantgroup.com (Postfix) with SMTP id D9EB2186A692 for ; Fri, 11 Sep 2015 16:41:08 +0200 (CEST) X-Fuglu-Suspect: cfa3de678fbb420b95b048f1e5a4d9d8 X-Fuglu-Spamstatus: NO Received: from zoidberg.compliantgroup.com (zoidberg.compliantgroup.com [94.23.207.160]) by kif.compliantgroup.com (Postfix) with ESMTP id 0D6ED186A68F for ; Fri, 11 Sep 2015 16:41:07 +0200 (CEST) Received: from zoidberg.compliantgroup.com (localhost [127.0.0.1]) by zoidberg.compliantgroup.com (Postfix) with SMTP id 8C7FB14D1E7 for ; Fri, 11 Sep 2015 16:41:28 +0200 (CEST) X-Fuglu-Suspect: 0b6303089fa44c6e8c8515e64deaaec9 X-Fuglu-Spamstatus: NO Received: from localhost (host86-163-28-172.range86-163.btcentralplus.com [86.163.28.172]) (Authenticated sender: master@caomhin.org) by zoidberg.compliantgroup.com (Postfix) with ESMTPA id 764DC14D190 for ; Fri, 11 Sep 2015 16:41:28 +0200 (CEST) Date: Fri, 11 Sep 2015 15:42:18 +0100 (BST) From: Kevin Golding To: freebsd-ports@freebsd.org Message-ID: <441028827.153.1441982537926.JavaMail.Kevin@Thoth> In-Reply-To: <425887562.141.1441981537083.JavaMail.Kevin@Thoth> Subject: rc script problem - pidfile not being recognised MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2015 14:51:23 -0000 I've been trying to work on a new port and it's my first that uses an rc script so I've been expecting a few bumps, but there's one thing I can't seem to fix and it's a blocker. I can't stop the daemon! It dopes create a pidfile so I have the following line in my script: pidfile="/var/run/${name}.pid" Alas... # service fuglu stop fuglu not running? (check /var/run/fuglu.pid). # cat /var/run/fuglu.pid 24013 I don't get it. It is the right process ID: # ps -waux | grep fuglu nobody 24013 0.0 0.5 139532 37372 - I 3:57PM 0:01.03 /usr/local/bin/python2.7 /usr/local/bin/fuglu --pidfile /var/r root 26179 0.0 0.0 18824 1976 0 S+ 4:30PM 0:00.00 grep fuglu I'm at a loss as to what to try, I feel I'm missing something blindingly obvious but it's a mystery to me so if anyone can wave the big red arrow at my mistake I'd be a happy chappy! Full fuglu.in below: #!/bin/sh # $FreeBSD$ # # PROVIDE: fuglu # REQUIRE: LOGIN # KEYWORD: shutdown # # Add these lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # fuglu_enable (bool): Set to NO by default. # Set it to YES to enable fuglu. . /etc/rc.subr name="fuglu" rcvar=fuglu_enable load_rc_config $name : ${fuglu_enable:=no} command=%%PREFIX%%/bin/${name} pidfile="/var/run/${name}.pid" run_rc_command "$1"