#!/bin/rc #help with common fossilcons tasks while (! ~ $FOSCONSCHOICE 'q'){ echo 'fossil console task assistant' echo '(1) Trigger archival snapshot to venti (may run for awhile in the background)' echo '(2) add user to the users table' echo '(3) check disk usage' echo '(q) quit' FOSCONCHOICE=`{read} switch($FOSCONCHOICE){ case 1 echo 'triggering snap, will operate in background' echo 'echo fsys main snap -a >>/srv/fscons' echo 'fsys main snap -a' >>/srv/fscons case 2 echo 'enter user name to add' NEWUSER=`{read} echo 'echo uname $NEWUSER $NEWUSER >>/srv/fscons' echo uname $NEWUSER $NEWUSER >>/srv/fscons echo 'user added, dont forget to add auth information' case 3 touch /tmp/fscons echo 'echo fsys main df >>/srv/fscons' cat /srv/fscons >>/tmp/fscons & sleep 1 echo 'fsys main df' >>/srv/fscons sleep 1 tail -n 2 /tmp/fscons echo kill >/proc/$apid/note echo kill >/proc/$apid/ctl rm /tmp/fscons case q exit } } exit