summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2015-12-29 00:05:54 +0000
committerdholland <dholland@pkgsrc.org>2015-12-29 00:05:54 +0000
commit4c63f9020821af0b74d942f359f82862efd77d88 (patch)
tree089c13709fc155a57686008fab5c001b65415c30
parentb8ae10d68dec3eea78999b1d970bb97495179b12 (diff)
downloadpkgsrc-4c63f9020821af0b74d942f359f82862efd77d88.tar.gz
Modernize rc scripts, for PR 18681. Add hfaxd.sh, faxq.sh; remove
hylafax.sh.
-rw-r--r--comms/hylafax/Makefile5
-rw-r--r--comms/hylafax/files/faxq.sh21
-rw-r--r--comms/hylafax/files/hfaxd.sh21
-rwxr-xr-xcomms/hylafax/files/hylafax.sh35
4 files changed, 45 insertions, 37 deletions
diff --git a/comms/hylafax/Makefile b/comms/hylafax/Makefile
index afae6e31b44..a635fc11616 100644
--- a/comms/hylafax/Makefile
+++ b/comms/hylafax/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.71 2015/03/12 15:23:39 tnn Exp $
+# $NetBSD: Makefile,v 1.72 2015/12/29 00:05:54 dholland Exp $
DISTNAME= hylafax-6.0.6
+PKGREVISION= 1
CATEGORIES= comms
MASTER_SITES= ftp://ftp.hylafax.org/source/
@@ -32,7 +33,7 @@ MANCOMPRESSED= yes
FAXUSER?= uucp
FAXGROUP?= dialer
-RCD_SCRIPTS= hylafax
+RCD_SCRIPTS= hfaxd faxq
EGDIR= share/examples/hylafax
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