summaryrefslogtreecommitdiffstats
path: root/initscript
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2006-02-13 08:07:45 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2006-02-13 08:07:45 +0000
commit38c9b2e0fef63e281164d39bfc3a99e7eca2dfa6 (patch)
tree775fec5752882c504d856c4a6f134d9af76822b1 /initscript
parent85ee6bdb696179980845a73aa279a2d1314ce289 (diff)
* Updated doc/TODO
* Welcome onboard to slackware thanx to Diffie (Paul Blazejowski) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1134 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'initscript')
-rw-r--r--initscript/Makefile.am4
-rw-r--r--initscript/slackware/Makefile.am34
-rw-r--r--initscript/slackware/avahi-daemon.in80
-rw-r--r--initscript/slackware/avahi-dnsconfd.in80
4 files changed, 198 insertions, 0 deletions
diff --git a/initscript/Makefile.am b/initscript/Makefile.am
index dbce3a2..7fcd15f 100644
--- a/initscript/Makefile.am
+++ b/initscript/Makefile.am
@@ -50,3 +50,7 @@ endif
if TARGET_FREEBSD
SUBDIRS += freebsd
endif
+
+if TARGET_SLACKWARE
+SUBDIRS += slackware
+endif
diff --git a/initscript/slackware/Makefile.am b/initscript/slackware/Makefile.am
new file mode 100644
index 0000000..5763f7a
--- /dev/null
+++ b/initscript/slackware/Makefile.am
@@ -0,0 +1,34 @@
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+initddir = $(sysconfdir)/rc.d
+
+EXTRA_DIST = avahi-daemon.in avahi-dnsconfd.in
+
+initd_SCRIPTS = rc.avahidaemon rc.avahidnsconfd
+
+CLEANFILES = avahi-daemon avahi-dnsconfd
+
+rc.avahidaemon: avahi-daemon.in
+ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ chmod +x $@
+
+rc.avahidnsconfd: avahi-dnsconfd.in
+ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ chmod +x $@
diff --git a/initscript/slackware/avahi-daemon.in b/initscript/slackware/avahi-daemon.in
new file mode 100644
index 0000000..acd377d
--- /dev/null
+++ b/initscript/slackware/avahi-daemon.in
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+# Start/stop/restart the avahi daemon:
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC="Avahi mDNS/DNS-SD Daemon"
+NAME="avahi-daemon"
+DAEMON="@sbindir@/$NAME"
+
+avahid_start()
+{
+ echo "Starting $DESC: $DAEMON -D"
+ $DAEMON -D
+}
+
+avahid_status()
+{
+ $DAEMON -c
+ [ $? = 0 ]
+}
+
+avahid_stop()
+{
+ echo -en "Stopping $DESC: "
+ $DAEMON -c
+ [ $? != 0 ]
+ echo "stopped";
+ $DAEMON -k 2>/dev/null
+}
+
+avahid_restart()
+{
+ avahid_stop
+ avahid_start
+}
+
+case "$1" in
+'start')
+ if ( ! avahid_status ); then
+ avahid_start
+ else
+ echo "$DESC is already running (will not start it twice)."
+ fi
+ ;;
+'stop')
+ avahid_stop
+ ;;
+'restart')
+ avahid_restart
+ ;;
+'status')
+ if ( avahid_status ); then
+ echo "$DESC is currently running"
+ else
+ echo "$DESC is not running."
+ fi
+ ;;
+*)
+ echo "usage $0 start|stop|status|restart"
+esac
+
diff --git a/initscript/slackware/avahi-dnsconfd.in b/initscript/slackware/avahi-dnsconfd.in
new file mode 100644
index 0000000..4da14fa
--- /dev/null
+++ b/initscript/slackware/avahi-dnsconfd.in
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+# Start/stop/restart the avahi dnsconfd daemon:
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC="Avahi mDNS/DNS-SD DNS Server Configuration Daemon"
+NAME="avahi-dnsconfd"
+DAEMON="@sbindir@/$NAME"
+
+avahidns_start()
+{
+ echo "Starting $DESC: $DAEMON -D"
+ $DAEMON -D
+}
+
+avahidns_status()
+{
+ $DAEMON -c
+ [ $? = 0 ]
+}
+
+avahidns_stop()
+{
+ echo -en "Stopping $DESC: "
+ $DAEMON -c
+ [ $? != 0 ]
+ echo "stopped";
+ $DAEMON -k 2>/dev/null
+}
+
+avahidns_restart()
+{
+ avahidns_stop
+ avahidns_start
+}
+
+case "$1" in
+'start')
+ if ( ! avahidns_status ); then
+ avahidns_start
+ else
+ echo "$DESC is already running (will not start it twice)."
+ fi
+ ;;
+'stop')
+ avahidns_stop
+ ;;
+'restart')
+ avahidns_restart
+ ;;
+'status')
+ if ( avahidns_status ); then
+ echo "$DESC is currently running"
+ else
+ echo "$DESC is not running."
+ fi
+ ;;
+*)
+ echo "usage $0 start|stop|status|restart"
+esac
+