Plan 9 from Bell Labs’s /usr/web/sources/contrib/mycroftiv/unreleased/confighelper/fossiltaskhelper

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.