LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ez-ipupdate.init of Package ez-ipupdate (Project openSUSE:Factory)

#! /bin/sh
# Copyright (c) 1995-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Henne Vogelsang <feedback@suse.de>
#
# /etc/init.d/ez-ipupdate
#   and its symbolic link
# /(usr/)sbin/rcez-ipupdate
#
### BEGIN INIT INFO
# Provides:          ez-ipupdate
# Required-Start:    $syslog $remote_fs $network
# Required-Stop:     $syslog $remote_fs
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: ez-ipupdate daemon providing dynamic DNS updates
# Description:       Start ez-ipupdate to provide dynamic DNS updates
### END INIT INFO

# Check for missing binaries (stale symlinks should not happen)
EZIPUP_BIN=/usr/bin/ez-ipupdate
test -x $EZIPUP_BIN || exit 5

# Check for existence of needed config file and read it
EZIPUP_CONFIG=/etc/ez-ipupdate.conf
test -r $EZIPUP_CONFIG || exit 6

. /etc/rc.status

# Reset status of this service
rc_reset

case "$1" in
    start)
	echo -n "Starting ez-ipupdate "
        startproc $EZIPUP_BIN -c /etc/ez-ipupdate.conf -w
	rc_status -v
	;;
    stop)
	echo -n "Shutting down ez-ipupdate "
	killproc -TERM $EZIPUP_BIN
	rc_status -v
	;;
    try-restart)
	$0 status >/dev/null &&  $0 restart
	rc_status
	;;
    restart)
	$0 stop
	$0 start
	rc_status
	;;
    force-reload)
	echo -n "Reload service ez-ipupdate "
	killproc -HUP $EZIPUP_BIN
	rc_status -v
	;;
    reload)
	echo -n "Reload service ez-ipupdate "
	killproc -HUP $EZIPUP_BIN
	rc_status -v
	;;
    status)
	echo -n "Checking for service ez-ipupdate "
	checkproc $EZIPUP_BIN
	rc_status -v
	;;
    *)
	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
	exit 1
	;;
esac
rc_exit