#!/bin/sh

profile=

mkdir -p /var/run/apt-proxy || exit -1

# If you run 'aptest profile' you will get a dump of all functions to ap-profile.log
if [ "$1" = profile ]; then
  profile="-p ap-profile.log"
fi

echo "----------- `date` -------------------" >> aptest.log
PYTHONPATH="`pwd`" twistd --pidfile=/var/run/apt-proxy/twistd.pid $profile -n -y bin/apt-proxy | tee -a aptest.log
