diff options
author | dholland <dholland@pkgsrc.org> | 2015-12-29 00:05:54 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2015-12-29 00:05:54 +0000 |
commit | 9aec9f46d9a2b3cc5476c94c4c5d3ca432137223 (patch) | |
tree | 089c13709fc155a57686008fab5c001b65415c30 /comms/hylafax/files | |
parent | 1dde5d6b3eaeed8b8655528d8e777281c83af78e (diff) | |
download | pkgsrc-9aec9f46d9a2b3cc5476c94c4c5d3ca432137223.tar.gz |
Modernize rc scripts, for PR 18681. Add hfaxd.sh, faxq.sh; remove
hylafax.sh.
Diffstat (limited to 'comms/hylafax/files')
-rw-r--r-- | comms/hylafax/files/faxq.sh | 21 | ||||
-rw-r--r-- | comms/hylafax/files/hfaxd.sh | 21 | ||||
-rwxr-xr-x | comms/hylafax/files/hylafax.sh | 35 |
3 files changed, 42 insertions, 35 deletions
diff --git a/comms/hylafax/files/faxq.sh b/comms/hylafax/files/faxq.sh new file mode 100644 index 00000000000..d09fc885831 --- /dev/null +++ b/comms/hylafax/files/faxq.sh @@ -0,0 +1,21 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: faxq.sh,v 1.1 2015/12/29 00:05:54 dholland Exp $ + +# PROVIDE: faxq +# REQUIRE: DAEMON +# KEYWORD: shutdown + +$_rc_subr_loaded . /etc/rc.subr + +name=faxq +rcvar=$name +command=@PREFIX@/sbin/faxq +command_args= +#pidfile=@VARBASE@/run/faxq.pid +required_files=@VARBASE@/spool/hylafax/etc/config + +load_rc_config $name +run_rc_command "$1" + +
\ No newline at end of file diff --git a/comms/hylafax/files/hfaxd.sh b/comms/hylafax/files/hfaxd.sh new file mode 100644 index 00000000000..fd761204d34 --- /dev/null +++ b/comms/hylafax/files/hfaxd.sh @@ -0,0 +1,21 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: hfaxd.sh,v 1.1 2015/12/29 00:05:54 dholland Exp $ + +# PROVIDE: hfaxd +# REQUIRE: DAEMON +# KEYWORD: shutdown + +$_rc_subr_loaded . /etc/rc.subr + +name=hfaxd +rcvar=$name +command=@PREFIX@/libexec/hfaxd +command_args="-i 4559 -o 4557 -s 444" +#pidfile=@VARBASE@/run/hfaxd.pid +required_files=@VARBASE@/spool/hylafax/etc/config + +load_rc_config $name +run_rc_command "$1" + +
\ No newline at end of file diff --git a/comms/hylafax/files/hylafax.sh b/comms/hylafax/files/hylafax.sh deleted file mode 100755 index b364e70e4b9..00000000000 --- a/comms/hylafax/files/hylafax.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!@RCD_SCRIPTS_SHELL@ -# -# $NetBSD: hylafax.sh,v 1.4 2002/09/20 02:01:55 grant Exp $ -# -# PROVIDE: hylafax -# REQUIRE: DAEMON - -command=${1:-start} - -case ${command} in -start) - if [ -x @PREFIX@/libexec/hfaxd -a -f /var/spool/hylafax/etc/config ] ; then - echo -n 'Starting hfaxd' - @PREFIX@/libexec/hfaxd -i 4559 -o 4557 -s 444 - - echo ' faxq.' - @PREFIX@/sbin/faxq - fi - ;; -stop) - PIDS=`ps -ax -o pid,command|egrep '[ /](faxq|hfaxd) '|awk '{printf " " $1}'` - if [ -n "$PIDS" ];then - echo "Stopping hylafax pids$PIDS." - kill -TERM $PIDS - else - echo "hylafax not running?" - fi - ;; -restart) - ( $0 stop ) - sleep 1 - $0 start - ;; -esac -exit 0 |