2007-02-22 14:11:21 +01:00
|
|
|
#! /bin/sh
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: avahi-bookmarks
|
2007-10-11 18:55:38 +02:00
|
|
|
# Required-Start: $network $remote_fs avahi-dnsconfd
|
2008-09-05 20:18:45 +02:00
|
|
|
# Required-Stop: $network $remote_fs avahi-dnsconfd
|
2007-02-22 14:11:21 +01:00
|
|
|
# Default-Start: 3 5
|
|
|
|
# Default-Stop:
|
2007-10-11 18:55:38 +02:00
|
|
|
# Short-Description: ZeroConf Bookmarks server
|
2007-02-22 14:11:21 +01:00
|
|
|
# Description: Avahi ZeroConf Bookmarks server
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
AVAHI_BIN=/usr/bin/avahi-bookmarks
|
|
|
|
test -x $AVAHI_BIN || exit 5
|
|
|
|
|
|
|
|
. /etc/rc.status
|
|
|
|
rc_reset
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
echo -n "Starting Avahi Bookmarks server"
|
|
|
|
/sbin/startproc -q -u avahi $AVAHI_BIN
|
|
|
|
rc_status -v
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
echo -n "Shutting down Avahi Bookmarks server"
|
|
|
|
/sbin/killproc $AVAHI_BIN
|
|
|
|
rc_status -v
|
|
|
|
;;
|
2008-01-30 18:00:45 +01:00
|
|
|
try-restart|condrestart)
|
|
|
|
if test "$1" = "condrestart"; then
|
|
|
|
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
|
|
|
fi
|
|
|
|
$0 status
|
|
|
|
if test $? = 0; then
|
|
|
|
$0 restart
|
|
|
|
else
|
|
|
|
rc_reset
|
|
|
|
fi
|
|
|
|
rc_status
|
|
|
|
;;
|
2007-02-22 14:11:21 +01:00
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
|
|
|
rc_status
|
|
|
|
;;
|
|
|
|
force-reload|reload)
|
|
|
|
echo -n "Reloading Avahi Bookmarks server"
|
|
|
|
$AVAHI_BIN -r
|
|
|
|
rc_status -v
|
|
|
|
;;
|
|
|
|
status)
|
|
|
|
echo -n "Checking for Avahi Bookmarks server: "
|
2008-01-30 18:00:45 +01:00
|
|
|
/sbin/checkproc $AVAHI_BIN
|
2007-02-22 14:11:21 +01:00
|
|
|
rc_status -v
|
|
|
|
;;
|
|
|
|
*)
|
2008-01-30 18:00:45 +01:00
|
|
|
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
|
2007-02-22 14:11:21 +01:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|