summaryrefslogtreecommitdiff
blob: 3d60b8a32cef2858c5bb9e2bc236a57a009cda3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
C="client"
C1_CFG="${C}1/${C}.cfg"
cd /opt/foldingathome/
if [ ! -f ${C1_CFG} ]; then
	echo "Client not yet configured, exiting"
	exit 1;
fi
sed -i -e 's/^\(team=\)0/\111298/' ${C1_CFG}
declare -i id=$(sed -e 's/^machineid=\([0-9]*\).*$/\1/p;d' ${C1_CFG})
for (( i=2; ${i}<=8; i=${i}+1 )); do
	id=$id+1
	sed -e "s/^\(machineid=\)[0-9]*/\1${id}/" ${C1_CFG} > ${C}${i}/${C}.cfg
done