#!/bin/sh

# Source the configuration file for the boinc-client init script.
if [ -e /etc/default/boinc-client ]; then
    . /etc/default/boinc-client
fi

# If $BOINC_DIR is empty or if it isn't a directory, set it to the default
# BOINC data directory.
if [ -z "$BOINC_DIR" -o ! -d "$BOINC_DIR" ]; then
    BOINC_DIR=/var/lib/boinc-client
fi

cd $BOINC_DIR && exec boincmgr "$@"
