Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37870280
en ru br
ALT Linux repositórios
S:1.18.0-alt1
5.0: 1.0.2-alt2
4.1: 1.0.2-alt1.M41.1

Group :: Sistema/Servidores
RPM: unbound

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#!/bin/sh
#
# unbound This shell script takes care of starting and stopping
# unbound (DNS server).
#
# chkconfig: - 14 86
# description: unbound is a Domain Name Server (DNS) \
# that is used to resolve host names to IP addresses.

### BEGIN INIT INFO
# Provides: $named unbound
# Required-Start: $network $local_fs
# Required-Stop: $network $local_fs
# Should-Start: $syslog
# Should-Stop: $syslog
# Short-Description: unbound recursive Domain Name Server.
# Description: unbound is a Domain Name Server (DNS)
# that is used to resolve host names to IP addresses.
### END INIT INFO

WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network

LOCKFILE=/var/lock/subsys/unbound
RETVAL=0

check_conf()
{
echo -n "Checking unbound configuration:"
result=$(unbound-checkconf 2>&1)
RETVAL=$?
if [ "x$RETVAL" == "x0" ]; then
echo_success
echo
return $RETVAL
else
echo_failure
echo
echo "$result"
return $RETVAL
fi
}

start()
{
is_yes "$NETWORKING" || return 0
check_conf && start_daemon --lockfile "$LOCKFILE" --expect-user _unbound -- unbound
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --lockfile "$LOCKFILE" --expect-user _unbound -- unbound
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

reload()
{
check_conf && msg_reloading unbound && stop_daemon --expect-user _unbound -HUP -- unbound
RETVAL=$?
return $RETVAL
}


# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status --lockfile "$LOCKFILE" --expect-user _unbound unbound
RETVAL=$?
;;
reload)
reload
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
reload
fi
;;
*)
msg_usage "${0##*/} {start|stop|restart|reload|status|condstop|condrestart}"
RETVAL=1
esac

exit $RETVAL
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009