head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2010.09.27.07.34.46;	author djc;	state dead;
branches;
next	1.1;
commitid	63674ca049164567;

1.1
date	2006.10.16.00.12.00;	author smithj;	state Exp;
branches;
next	;
commitid	56bd4532ce4e4567;


desc
@@


1.2
log
@app-admin/rmake removal, bug 267348.
@
text
@#/sbin/runscript
#
# Copyright (c) 2006 rPath, Inc.
#
# Distributed under the terms of the Common Public License, version 1.0
# A copy can be found here: http://www.rpath.com/permanent/cpl-license.html
#
# Gentoo Linux style initscript

if [ -e /etc/sysconfig/rmake ] ; then
    . /etc/sysconfig/rmake
fi

depend() {
    use logger
}

config() {
    cd /etc/rmake;
    /usr/sbin/rmake-server config
    return $?
}


start() {
    ebegin "Starting rMake Server and Repository:"
    cd /etc/rmake;
    /usr/sbin/rmake-server start
    RETVAL=$?
    [ $RETVAL = 0 ] && touch /var/lock/subsys/rmake
    eend $RETVAL
}

startdebug() {
    ebegin "Starting rMake Server and Repository in debug mode:"
    cd /etc/rmake;
    /usr/sbin/rmake-server start -n -d
    RETVAL=$?
    eend $RETVAL
}



stop() {
    ebegin "Shutting down rMake Server and Repository: "
    cd /etc/rmake;
    /usr/sbin/rmake-server stop
    RETVAL=$?
    [ $RETVAL = 0 ] && rm -f /var/lock/subsys/rmake
    eend $RETVAL
}

restart() {
    stop
    start
}

reset() {
    stop
    resetinternal || return $?
    start || return $?
}

resetinternal() {
    ebegin "Flushing rMake internal repository and database"
    cd /etc/rmake;
    /usr/sbin/rmake-server reset
    RETVAL=$?
    eend $RETVAL
}

RETVAL=0

# See how we were called.
case "$1" in
    config)
        config
        ;;
    start)
        start
        ;;
    stop)
        stop
        ;;
    debug)
        startdebug
        ;;
    status)
        status rmake-server
        ;;
    restart|reload)
        restart
        ;;
    reset)
        reset
        ;;
    *)
        echo "Usage: $0 {start|stop|debug|status|restart|reload|config|reset}"
        exit 1
esac

exit $?
@


1.1
log
@initial version
(Portage version: 2.1.1)
@
text
@@

