freebsd-ports/net/boinc-client/pkg-install
Pav Lucistnik ead1ef5a95 Add boinc-client, Berkeley Open Infrastructure for Network Computing.
BOINC is a software platform for distributed computing using volunteer
computer resources.

Many different projects can use BOINC.  SETI@HOME, for example, has
been redesigned to use BOINC and the astro/boinc-setiathome port
supercedes the astro/setiathome port.

WWW: http://boinc.berkeley.edu/

PR:		ports/72714
Submitted by:	J.R. Oldroyd <fbsd@opal.com>
2004-10-16 19:29:30 +00:00

25 lines
617 B
Bash

#!/bin/sh
username=%%BOINC_USER%%
group=%%BOINC_GROUP%%
home=%%BOINC_HOME%%
shell=/bin/sh
case $2 in
POST-INSTALL)
if ! pw usershow ${username} >/dev/null 2>&1; then
if ! pw useradd ${username} -g ${group} -c BOINC -d ${home} -s ${shell}; then
err=$?
echo "WARNING: Unable to create user. pw returned $err"
echo "You will need to create a boinc user and chown the boinc dir."
exit $err
else
echo "boinc user created."
fi
else
echo "boinc user found. using existing boinc user."
fi
mkdir -p ${home} ${home}/projects
chown ${username}:${group} ${home} ${home}/projects
;;
esac