#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2008 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### BUILD_SPY_FILENAME=$BASEDIR/.build_spy build_spy() { local KEY KEY=$1; shift 1 echo -n "&${KEY}=$*" >> $BUILD_SPY_FILENAME } build_spy_send_profile() { build_spy hostname $HOSTNAME build_spy distcc ${DISTCC_PORT-3632} build_spy jobs ${DISTCC_JOBS} } build_spy_escape() { base64 || echo "Base64 error." } if [ "$(basename $0)" == "make-buildspy" ]; then sleep 10 while true; do DATA=$(cat $BUILD_SPY_FILENAME 2>/dev/null || true) > $BUILD_SPY_FILENAME [ -n "$DATA" ] && \ wget -q -O /dev/null --user-agent="${NAME}BuildSpy/${VERSION}" \ --post-data="action=set&uuid=${UUID}${DATA}" \ http://build.ipfire.org/rpc.py & [ -e $BASEDIR/.running ] || break sleep 10 done rm -f $BUILD_SPY_FILENAME fi