Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # ipv6assignd- this script starts and stops dhcp6 daemon
- #
- # chkconfig: 345 85 15
- # description: A simple dhcp ipv6 daemon for tcp_proxy
- # processname: ipv6assignd
- # config: /etc/ipv6assignd.cfg
- # pidfile: /tmp/ipv6assignd.pid
- # Source function library.
- . /etc/rc.d/init.d/functions
- # Source networking configuration.
- . /etc/sysconfig/network
- # Check that networking is up.
- [ "$NETWORKING" = "no" ] && exit 0
- ipv6assignd="/usr/bin/ipv6assignd"
- prog=$(basename $ipv6assignd)
- pidfile="/tmp/ipv6assignd.pid"
- DHCP6_CONF_FILE="/etc/ipv6assignd.cfg"
- start() {
- [ -x $ipv6assignd ] || exit 5
- [ -f $DHCP6_CONF_FILE ] || exit 6
- echo -n $"Starting $prog: "
- daemon $ipv6assignd -c $DHCP6_CONF_FILE
- retval=$?
- echo
- [ $retval -eq 0 ] && touch $pidfile
- return $retval
- }
- stop() {
- echo -n $"Stopping $prog: "
- killproc $prog -QUIT
- retval=$?
- echo
- [ $retval -eq 0 ] && rm -f $pidfile
- return $retval
- }
- restart() {
- stop
- start
- }
- case "$1" in
- start)
- $1
- ;;
- stop)
- $1
- ;;
- restart)
- $1
- ;;
- *)
- echo $"Usage: $0 {start|stop|restart}"
- exit 2
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement