Added first go at a Gentoo rc-script
authorMalcolm Davenport <malcolmd@digium.com>
Mon, 12 Jan 2004 02:44:34 +0000 (02:44 +0000)
committerMalcolm Davenport <malcolmd@digium.com>
Mon, 12 Jan 2004 02:44:34 +0000 (02:44 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1960 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/init.d/rc.gentoo.asterisk [new file with mode: 0755]

diff --git a/contrib/init.d/rc.gentoo.asterisk b/contrib/init.d/rc.gentoo.asterisk
new file mode 100755 (executable)
index 0000000..ae75200
--- /dev/null
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+       need net logger
+}
+
+start() {
+       ebegin "Starting Asterisk"
+       /usr/sbin/asterisk
+       eend $? "Failed to start Asterisk"
+}
+
+stop() {
+       ebegin "Stopping Asterisk"
+       kill $(cat /var/run/asterisk.pid)
+       eend $? "Failed to stop Asterisk"
+}