Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37557284
en ru br
Репозитории ALT
S:1.2.9a-alt2
5.1: 1.2.7-alt1
4.1: 1.2.6-alt1
4.0: 1.2.5-alt1
3.0: 1.2-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: pdnsd

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/bin/sh
# $Id: pdnsd.init,v 1.2 2003/01/27 00:28:58 at Exp $
#
# /etc/init.d/pdnsd
# Init file for pdnsd server
#
# chkconfig: 2345 20 80
# description: a caching dns proxy for small networks or dialin accounts
# processname: pdnsd
# config: /etc/pdnsd.conf
# pidfile: /var/run/pdnsd.pid

DAEMON=/usr/sbin/pdnsd
CONFIGFILE=/etc/pdnsd.conf
LOCKFILE=/var/lock/subsys/pdnsd
PIDFILE=/var/run/pdnsd.pid
RETVAL=0

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

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network &&
[ "$NETWORKING" != no ] &&
[ -x $DAEMON ] &&
[ -s $CONFIGFILE ] ||
exit

start()
{
echo -n "Starting pdnsd: "
daemon "$DAEMON" -d -c "$CONFIGFILE" -p "$PIDFILE"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch "$LOCKFILE"
return $RETVAL
}

stop()
{
echo -n "Shutting down pdnsd: "
killproc "$DAEMON"
echo
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f "$LOCKFILE"
return $RETVAL
}

restart()
{
stop
[ $RETVAL -eq 0 ] && sleep 2
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status "$DAEMON"
RETVAL=$?
;;
*)
echo "Usage: ${0##*/} {start|stop|restart|reload|condstop|condrestart|status}"
RETVAL=1
;;
esac

exit $RETVAL
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin