From owner-svn-ports-head@freebsd.org Thu Dec 10 04:59:41 2020 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 05AC3474A3E; Thu, 10 Dec 2020 04:59:41 +0000 (UTC) (envelope-from danfe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cs1tN6lWtz4tbB; Thu, 10 Dec 2020 04:59:40 +0000 (UTC) (envelope-from danfe@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 D61611328B; Thu, 10 Dec 2020 04:59:40 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BA4xepI014587; Thu, 10 Dec 2020 04:59:40 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BA4xefw014585; Thu, 10 Dec 2020 04:59:40 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202012100459.0BA4xefw014585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Thu, 10 Dec 2020 04:59:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r557412 - in head/sysutils/pies: . files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in head/sysutils/pies: . files X-SVN-Commit-Revision: 557412 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.34 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, 10 Dec 2020 04:59:41 -0000 Author: danfe Date: Thu Dec 10 04:59:40 2020 New Revision: 557412 URL: https://svnweb.freebsd.org/changeset/ports/557412 Log: Add an rc script. Submitted by: maintainer Added: head/sysutils/pies/files/ head/sysutils/pies/files/pies.in (contents, props changed) Modified: head/sysutils/pies/Makefile Modified: head/sysutils/pies/Makefile ============================================================================== --- head/sysutils/pies/Makefile Thu Dec 10 04:35:50 2020 (r557411) +++ head/sysutils/pies/Makefile Thu Dec 10 04:59:40 2020 (r557412) @@ -3,6 +3,7 @@ PORTNAME= pies PORTVERSION= 1.4 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://download.gnu.org.ua/pub/release/${PORTNAME}/ \ http://download.gnu.org.ua/pub/alpha/${PORTNAME}/ @@ -14,6 +15,7 @@ LICENSE= GPLv3+ USES= charsetfix iconv tar:bz2 GNU_CONFIGURE= yes +USE_RC_SUBR= ${PORTNAME} INFO= ${PORTNAME} PORTDOCS= ChangeLog NEWS README Added: head/sysutils/pies/files/pies.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/pies/files/pies.in Thu Dec 10 04:59:40 2020 (r557412) @@ -0,0 +1,61 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: pies +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown +# + +. /etc/rc.subr + +name="pies" +rcvar=pies_enable +command="%%PREFIX%%/sbin/${name}" +ctlcommand="%%PREFIX%%/bin/${name}ctl" +pidfile="/var/run/${name}/${name}.pid" + +: ${pies_enable="NO"} + +start_cmd="${name}_start" +reload_cmd="${name}_reload" +restart_cmd="${name}_restart" +status_cmd="${name}_status" +stop_cmd="${name}_stop" +configtest_cmd="${name}_configtest" + +extra_commands="reload configtest" + +pies_start() +{ + ${command} +} + +pies_reload() +{ + ${ctlcommand} -v config reload +} + +pies_restart() +{ + ${ctlcommand} reboot +} + +pies_status() +{ + ${ctlcommand} -v list +} + +pies_stop() +{ + ${ctlcommand} shutdown +} + +pies_configtest() +{ + ${command} --lint +} + +load_rc_config ${name} +run_rc_command "$1"