#!/bin/rc # start standard fossil setup # fossilstart PARTITION [name] rfork e if(! ~ $venti ?*){ echo please set venti env variable as needed exit no.venti } foscons=fscons fossrv=fossil fospart=$1 if(~ $1 ''){ fospart=`{ls /dev/fs/fossil* /dev/sd*/fossil* >[2]/dev/null} if(~ $fospart ''){ echo 'no fossil partition found, please specify a target fossil' >[1=2] exit no.fossil } if(! ~ $#fospart 1){ echo 'found multiple partitions named fossil, please specify which is the target' >[1=2] exit toomany.fossils } if(! ~ $2 ''){ foscons=fscons.$2 fossrv=$2 } fossilcmd=fossil if(test -d /bin/fossil) fossilcmd=/bin/fossil/fossil $fossilcmd -c 'srv -p '$foscons echo 'fsys main config '$fospart >>/srv/fscons echo 'fsys main open -c 9000' >>/srv/fscons echo 'fsys main snaptime -a 0500' >>/srv/$foscons echo 'srv -A '$fossrv >>/srv/$foscons echo 'listen tcp!*!564' >>/srv/$foscons exit ''