From 9aac569eaa031e27191a3f4165b389a17f467ad2 Mon Sep 17 00:00:00 2001 From: Doug Barton Date: Sun, 5 Aug 2012 23:19:36 +0000 Subject: Move the rc.d scripts of the form *.sh.in to *.in Where necessary add $FreeBSD$ to the file No PORTREVISION bump necessary because this is a no-op --- net-p2p/uhub/Makefile | 2 +- net-p2p/uhub/files/uhub.in | 52 +++++++++++++++++++++++++++++++++++++++++++ net-p2p/uhub/files/uhub.sh.in | 52 ------------------------------------------- 3 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 net-p2p/uhub/files/uhub.in delete mode 100644 net-p2p/uhub/files/uhub.sh.in (limited to 'net-p2p/uhub') diff --git a/net-p2p/uhub/Makefile b/net-p2p/uhub/Makefile index a6b73cfb4ba9..312e986c3673 100644 --- a/net-p2p/uhub/Makefile +++ b/net-p2p/uhub/Makefile @@ -18,7 +18,7 @@ COMMENT= High performance peer-to-peer hub for the ADC network USE_PERL5_BUILD=yes USE_GMAKE= yes -USE_RC_SUBR= uhub.sh +USE_RC_SUBR= uhub USERS= uhub GROUPS= uhub SHAREGRP= uhub diff --git a/net-p2p/uhub/files/uhub.in b/net-p2p/uhub/files/uhub.in new file mode 100644 index 000000000000..7a06bcfefaf2 --- /dev/null +++ b/net-p2p/uhub/files/uhub.in @@ -0,0 +1,52 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: uhub +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable uhub: +# +# uhub_enable (bool): Set it to "YES" to enable uhub +# Default is "NO". +# uhub_pidfile (path): Set full path to pid file. +# Default is "/var/run/uhub.pid". +# + +. /etc/rc.subr + +name="uhub" +rcvar=uhub_enable + +load_rc_config $name + +: ${uhub_enable:="NO"} +: ${uhub_flags:="-L -u uhub -g uhub"} +: ${uhub_pidfile:="/var/run/${name}.pid"} + +command=%%PREFIX%%/bin/uhub +command_args="-f -p ${uhub_pidfile}" +pidfile=${uhub_pidfile} +required_files=${uhub_conf} +stop_postcmd=stop_postcmd +reload_precmd=reload_precmd +reload_postcmd=reload_postcmd +extra_commands="reload" + +stop_postcmd() +{ + rm -f ${pidfile} +} + +reload_precmd() +{ + echo "Reload ${name} configuration." +} + +reload_postcmd() +{ + kill -HUP `cat ${pidfile}` +} + +run_rc_command "$1" diff --git a/net-p2p/uhub/files/uhub.sh.in b/net-p2p/uhub/files/uhub.sh.in deleted file mode 100644 index 7a06bcfefaf2..000000000000 --- a/net-p2p/uhub/files/uhub.sh.in +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: uhub -# REQUIRE: LOGIN -# KEYWORD: shutdown -# -# Add the following lines to /etc/rc.conf to enable uhub: -# -# uhub_enable (bool): Set it to "YES" to enable uhub -# Default is "NO". -# uhub_pidfile (path): Set full path to pid file. -# Default is "/var/run/uhub.pid". -# - -. /etc/rc.subr - -name="uhub" -rcvar=uhub_enable - -load_rc_config $name - -: ${uhub_enable:="NO"} -: ${uhub_flags:="-L -u uhub -g uhub"} -: ${uhub_pidfile:="/var/run/${name}.pid"} - -command=%%PREFIX%%/bin/uhub -command_args="-f -p ${uhub_pidfile}" -pidfile=${uhub_pidfile} -required_files=${uhub_conf} -stop_postcmd=stop_postcmd -reload_precmd=reload_precmd -reload_postcmd=reload_postcmd -extra_commands="reload" - -stop_postcmd() -{ - rm -f ${pidfile} -} - -reload_precmd() -{ - echo "Reload ${name} configuration." -} - -reload_postcmd() -{ - kill -HUP `cat ${pidfile}` -} - -run_rc_command "$1" -- cgit v1.2.3