#!/bin/bash
# wrapper script to allow passwordless manager connections from users of the boinc group

# Look for any local configuration settings of $BOINCDIR
if [ -f /etc/sysconfig/boinc-client ]; then
	. /etc/sysconfig/boinc-client 
elif [ -f /etc/default/boinc-client ]; then
	. /etc/default/boinc-client
fi

# Otherwise pull $BOINCDIR from the init script
if [ -z $BOINCDIR ]; then
	BOINCDIR=`grep 'BOINCDIR=' /etc/init.d/boinc-client | tr '"' ' ' | sed 's|BOINCDIR=||'`;
fi

cd $BOINCDIR
boinc_gui >& /dev/null
