#!/bin/bash source "/usr/share/dar/dar-functions" daropts ":a:d:s:" $@ DISTS="$DEFAULT_DISTS" TAG="$DEFAULT_TAG" if pidof rsync &>/dev/null; then exit 0 fi chkconfig rsync off service xinetd restart find $PACKAGEDIR -newer $STATEDIR/dar-repo -name "*.rpm" -type f if [ $? -eq 0 ]; then touch $STATEDIR/dar-repo elif [ $? -gt 1 ]; then chkconfig rsync on service xinetd restart exit 0 fi for dist in $DISTS; do if [ -r "$CONFIGDIR/dists/$dist/config" ]; then source "$CONFIGDIR/dists/$dist/config" else warning "Configfile $CONFIGDIR/dists/$dist/config missing. Aborting." continue fi echo "Building $dist repository in $DISTPATH." build_tree_apt "$DISTNAME $DISTTAG" "$DISTPATH" build_tree_yum "$DISTNAME $DISTTAG" "$DISTPATH" build_repo_apt "$DISTPATH" build_repo_yum "$DISTPATH" build_repo "$DISTPATH" build_content "$DISTNAME" "$DISTPATH" done chkconfig rsync on service xinetd restart exit 0