summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2005-05-16 08:46:39 +0000
committerStefan Schweizer <genstef@gentoo.org>2005-05-16 08:46:39 +0000
commit54f74d84f437ae89b9fcd1f8462e5f4289cf1f81 (patch)
treebca0deaad9f3f4f2491c95a6dc9c15d0f3207ddc /net-dialup/capisuite
parentVersion Bump adding debian patches since the upstream maintainer is dead, ~amd64 (diff)
downloadhistorical-54f74d84f437ae89b9fcd1f8462e5f4289cf1f81.tar.gz
historical-54f74d84f437ae89b9fcd1f8462e5f4289cf1f81.tar.bz2
historical-54f74d84f437ae89b9fcd1f8462e5f4289cf1f81.zip
Oops, add initscript
Package-Manager: portage-1.589-cvs
Diffstat (limited to 'net-dialup/capisuite')
-rw-r--r--net-dialup/capisuite/Manifest1
-rw-r--r--net-dialup/capisuite/files/capisuite.initd58
2 files changed, 59 insertions, 0 deletions
diff --git a/net-dialup/capisuite/Manifest b/net-dialup/capisuite/Manifest
index 180f22252e34..72cfaf9f0039 100644
--- a/net-dialup/capisuite/Manifest
+++ b/net-dialup/capisuite/Manifest
@@ -8,3 +8,4 @@ MD5 d0b0dd46c8f863d3849ee1ce118da842 files/capisuite-0.4.5-gentoo.patch 1979
MD5 b6dc0c2a3cd0d7fb36b716a0e6514186 files/digest-capisuite-0.4.5 68
MD5 b89c96393c676a2977e9b0b55b553b9f files/capisuite-0.4.5-capiv3.patch 2151
MD5 f8cc369b2ad959cf9f00457f2729d5da files/digest-capisuite-0.4.5.3 137
+MD5 78748205ff049b27b92175e818a06e0d files/capisuite.initd 1417
diff --git a/net-dialup/capisuite/files/capisuite.initd b/net-dialup/capisuite/files/capisuite.initd
new file mode 100644
index 000000000000..1b9af8a9843b
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite.initd
@@ -0,0 +1,58 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capisuite/files/capisuite.initd,v 1.1 2005/05/16 08:46:39 genstef Exp $
+
+opts="reload"
+
+depend() {
+ need capi
+}
+
+checkconfig() {
+ local conf_fax conf_voice sec rest
+ # Check if there are configured users for fax or
+ # answering machine. Otherwise exit.
+ # IMPORTANT: Change this or comment it out if you want to use
+ # your own CapiSuite scripts.
+ while read -r sec rest; do
+ if [ "${sec:0:1}" = "[" -a "$sec" != "[GLOBAL]" ]; then
+ conf_fax=yes
+ break
+ fi
+ done < /etc/capisuite/fax.conf
+ while read -r sec rest; do
+ if [ "${sec:0:1}" = "[" -a "$sec" != "[GLOBAL]" ]; then
+ conf_voice=yes
+ break
+ fi
+ done < /etc/capisuite/answering_machine.conf
+ # end check for configured users
+
+ if ! [ "$conf_fax" -o "$conf_voice" ]; then
+ eerror "Please configure CapiSuite first!"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting CapiSuite"
+ start-stop-daemon --start --quiet --exec /usr/sbin/capisuite -- -d
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping CapiSuite"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/capisuite --retry 10 --signal TERM >/dev/null
+ eend $?
+}
+
+reload() {
+ ebegin "Reload CapiSuite"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/capisuite --signal HUP
+ eend $?
+}