From f0d9f58b7f1825fb95236f427a6400ad54ad4b5e Mon Sep 17 00:00:00 2001 From: dougb 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 --- security/pks/files/pksd.in | 63 +++++++++++++++++++++++++++++++++++++++++++ security/pks/files/pksd.sh.in | 63 ------------------------------------------- 2 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 security/pks/files/pksd.in delete mode 100644 security/pks/files/pksd.sh.in (limited to 'security/pks/files') diff --git a/security/pks/files/pksd.in b/security/pks/files/pksd.in new file mode 100644 index 000000000000..ff9a23a6f05e --- /dev/null +++ b/security/pks/files/pksd.in @@ -0,0 +1,63 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# +# PROVIDE: pksd +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="pksd" +rcvar=pksd_enable +command="%%PREFIX%%/sbin/pksd" +command_args="%%PREFIX%%/etc/${name}.conf &" +required_files="%%PREFIX%%/etc/${name}.conf" +start_precmd="pksd_precmd" +start_postcmd="pksd_runqueue" +stop_command="pksd_clean_stop" + +pksd_precmd() +{ + if [ ! -f %%PREFIX%%/etc/${name}.conf ] + then + exit 0 + else + dbdir=`awk '/db_dir/ { print $2 }' < %%PREFIX%%/etc/${name}.conf` + fi + if [ ! -f ${dbdir}/keydb000 -a -x %%PREFIX%%/bin/pksclient ] + then + %%PREFIX%%/bin/pksclient ${dbdir} create + fi +} + +pksd_runqueue() +{ + if [ -x %%PREFIX%%/bin/${name} -a -x %%PREFIX%%/bin/pks-queue-run.sh ] + then + echo "Doing queue run for ${name}." + sleep 5 + %%PREFIX%%/bin/pks-queue-run.sh %%PREFIX%%/etc/${name}.conf + fi +} + +pksd_clean_stop() +{ + if [ ! -f %%PREFIX%%/etc/${name}.conf ] + then + exit 0 + else + socket=`awk '/socket_name/ { print $2 }' < %%PREFIX%%/etc/${name}.conf` + fi + if [ -x %%PREFIX%%/bin/${name}ctl -a -S ${socket} ] + then + echo "Shutting down ${name} socket connections using pksdctl." + %%PREFIX%%/bin/${name}ctl ${socket} shutdown + else + echo "couldn't stop ${name}." + fi +} + + +load_rc_config $name +run_rc_command "$1" diff --git a/security/pks/files/pksd.sh.in b/security/pks/files/pksd.sh.in deleted file mode 100644 index ff9a23a6f05e..000000000000 --- a/security/pks/files/pksd.sh.in +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# -# PROVIDE: pksd -# REQUIRE: DAEMON - -. /etc/rc.subr - -name="pksd" -rcvar=pksd_enable -command="%%PREFIX%%/sbin/pksd" -command_args="%%PREFIX%%/etc/${name}.conf &" -required_files="%%PREFIX%%/etc/${name}.conf" -start_precmd="pksd_precmd" -start_postcmd="pksd_runqueue" -stop_command="pksd_clean_stop" - -pksd_precmd() -{ - if [ ! -f %%PREFIX%%/etc/${name}.conf ] - then - exit 0 - else - dbdir=`awk '/db_dir/ { print $2 }' < %%PREFIX%%/etc/${name}.conf` - fi - if [ ! -f ${dbdir}/keydb000 -a -x %%PREFIX%%/bin/pksclient ] - then - %%PREFIX%%/bin/pksclient ${dbdir} create - fi -} - -pksd_runqueue() -{ - if [ -x %%PREFIX%%/bin/${name} -a -x %%PREFIX%%/bin/pks-queue-run.sh ] - then - echo "Doing queue run for ${name}." - sleep 5 - %%PREFIX%%/bin/pks-queue-run.sh %%PREFIX%%/etc/${name}.conf - fi -} - -pksd_clean_stop() -{ - if [ ! -f %%PREFIX%%/etc/${name}.conf ] - then - exit 0 - else - socket=`awk '/socket_name/ { print $2 }' < %%PREFIX%%/etc/${name}.conf` - fi - if [ -x %%PREFIX%%/bin/${name}ctl -a -S ${socket} ] - then - echo "Shutting down ${name} socket connections using pksdctl." - %%PREFIX%%/bin/${name}ctl ${socket} shutdown - else - echo "couldn't stop ${name}." - fi -} - - -load_rc_config $name -run_rc_command "$1" -- cgit