Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > e737217a0bbc0d4707c8ba8dff2a9bd5 > files > 1

system-tools-backends2-2.4.0-1mdv2008.0.src.rpm

#!/bin/bash
#
# chkconfig: 345 25 65
# description: System Tools Backends
### BEGIN INIT INFO
# Provides: system-tools-backends
# Required-Start: messagebus
# Required-Stop: messagebus
# Default-Start: 3 4 5
# Short-Description: System Tools Backends
# Description: This is a daemon for system administration
#              It is controlled by the programs in gnome-system-tools 
### END INIT INFO

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

DAEMON=/usr/bin/system-tools-backends
PIDFILE=/var/run/system-tools-backends.pid
NAME=system-tools-backends
DESC="System Tools Backends"

start() {
    echo -n $"Starting $DESC:"
    daemon --pidfile $PIDFILE $DAEMON
    RETVAL=$?
    [ $RETVAL = 0 ] && touch /var/lock/subsys/$NAME && success || failure
    echo
    return $RETVAL
}

stop() {
    echo -n $"Stopping $DESC: "
    killproc $NAME
    RETVAL=$?
    if [ $RETVAL -eq 0 ] ; then
        rm -f /var/lock/subsys/$NAME 
    fi
    echo
    return $RETVAL
}

restart() {
    stop
    start
}

RETVAL=0

# See how we were called.
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    status)
        status $NAME
        ;;
    restart)
        restart
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart}"
        exit 1
esac

exit $?