shithub: privategrid

Download patch

ref: 3c11f684f57bbd145b472a9cd3aa1a5dbb28713f
author: glenda <glenda@9front.local>
date: Tue Dec 1 18:23:17 EST 2020

init commit

--- /dev/null
+++ b/01infernostart
@@ -1,0 +1,8 @@
+#!/bin/rc
+
+cd $home/inferno-os/Plan9/386/bin
+hubfs -s regemu
+mount -c /srv/regemu /n/hubfs
+touch /n/hubfs/regemu0 /n/hubfs/regemu1 /n/hubfs/regemu2
+emu </n/hubfs/regemu0 >>/n/hubfs/regemu1 >>[2]/n/hubfs/regemu2 &
+cd
--- /dev/null
+++ b/02infregstart
@@ -1,0 +1,12 @@
+#!/bin/rc
+
+mount -c /srv/regemu /n/reghub
+echo 'bind -c ''#₪'' /srv
+mount -A -c {ndb/registry} /mnt/registry
+9srvfs registry /mnt/registry &
+mount -A -c {ndb/registry} /n/registry
+9srvfs pubregistry /n/registry &
+' >>/n/reghub/regemu0
+sleep 2
+chmod 666 /srv/registry
+chmod 666 /srv/pubregistry
--- /dev/null
+++ b/03regreg
@@ -1,0 +1,18 @@
+#!/bin/rc
+
+myip=107.191.50.176
+auth/factotum
+echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+mount -c /srv/registry /mnt/registry
+hub -b listenreg
+mount /srv/listenreg /n/listenreg
+echo 'gridlisten1 -v -d gridregistry -m /mnt/registry tcp!*!6675 /bin/exportfs -R -S /srv/registry' >>/n/listenreg/io0
+hub -b listenpubreg
+mount /srv/listenpubreg /n/listenpubreg
+echo 'gridlisten1 -v -d pubregistry -m /n/pubregistry tcp!*!7675 /bin/exportfs -S /srv/pubregistry' >>/n/listenpubreg/io0
+hub -b listenregtls
+mount /srv/listenregtls /n/listenregtls
+echo 'gridlisten1 -tv -d gridregistry -m /mnt/registry tcp!*!16675 tlssrv -A /bin/aux/trampoline tcp!127.1!6675' >>/n/listenregtls/io0
+hub -b listenpubregtls
+mount /srv/listenpubregtls /n/listenpubregtls
+echo 'gridlisten1 -tv -d pubregistry -m /n/pubregistry tcp!*!17675 tlssrv -A /bin/aux/trampoline tcp!127.1!7675' >> /n/listenpubregtls/io0
--- /dev/null
+++ b/04chat
@@ -1,0 +1,19 @@
+#!/bin/rc
+
+myip=107.191.50.176
+auth/factotum
+echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+mount -c /srv/registry /mnt/registry
+cd $home/gridmods
+8.safehubfs -s gridchat
+chmod 666 /srv/gridchat
+mount -c /srv/gridchat /n/gridchat
+cd /n/gridchat
+touch chat gridhelp plan9 chanstuff
+cd
+hub -b listenchat
+mount /srv/listenchat /n/listenchat
+echo 'gridlisten1 -v -d gridchat -m /n/chat tcp!*!9997 /bin/exportfs -S /srv/gridchat' >>/n/listenchat/io0
+hub -b listenchattls
+mount /srv/listenchattls /n/listenchattls
+echo 'gridlisten1 -tv -d gridchat -m /n/chat tcp!*!19997 tlssrv -A /bin/aux/trampoline tcp!127.1!9997' >>/n/listenchattls/io0
--- /dev/null
+++ b/05wiki
@@ -1,0 +1,15 @@
+#!/bin/rc
+
+#myip=45.76.22.6
+rimport -a cpu32 /srv
+mount -c /srv/registry /mnt/registry
+auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+wikifs -p 666 -s gridwiki /sys/lib/wiki
+ip/httpd/httpd
+hub -b listenwiki
+mount /srv/listenwiki /n/listenwiki
+echo 'gridlisten1 -tv -d gridwiki -m /mnt/wiki tcp!*!17035 /bin/exportfs -S /srv/gridwiki' >>/n/listenwiki/io0
+hub -b listenwikitls
+mount /srv/listenwikitls /n/listenwikitls
+echo 'gridlisten1 -tv -d gridwiki -m /mnt/wiki tcp!*!27035 tlssrv -A /bin/aux/trampoline tcp!127.1!17035' >>/n/listenwikitls/io0
--- /dev/null
+++ b/06ramfs
@@ -1,0 +1,15 @@
+#!/bin/rc
+
+#myip=45.76.231.117
+rimport -a cpu32 /srv
+mount -c /srv/registry /mnt/registry
+#auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+ramfs -S gridram
+chmod 666 /srv/gridram
+hub -b listengridram
+mount /srv/listengridram /n/listengridram
+echo 'gridlisten1 -tv -d gridram -m /n/gridram tcp!*!9996 /bin/exportfs -S /srv/gridram' >>/n/listengridram/io0
+hub -b listengridramtls
+mount /srv/listengridramtls /n/listengridramtls
+echo 'gridlisten1 -tv -d gridram -m /n/gridram tcp!*!19996 tlssrv -A /bin/aux/trampoline tcp!127.1!9996' >>/n/listengridramtls/io0
--- /dev/null
+++ b/07gridroot
@@ -1,0 +1,14 @@
+#!/bin/rc
+
+#myip=45.63.75.148
+rimport -a cpu32 /srv /n/regsrv
+mount -c /n/regsrv/registry /mnt/registry
+srvfs -p 666 registry /mnt/registry
+auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+hub -b listenroot
+mount /srv/listenroot /n/listenroot
+echo 'gridlisten1 -v -d gridroot -m /n/gridroot tcp!*!564 /bin/exportfs -R -S /srv/boot' >>/n/listenroot/io0
+hub -b listenroottls
+mount /srv/listenroottls /n/listenroottls
+echo 'gridlisten1 -tv -d gridroot -m /n/gridroot tcp!*!10564 tlssrv -A /bin/aux/trampoline tcp!127.1!564' >>/n/listenroottls/io0
--- /dev/null
+++ b/08ftp
@@ -1,0 +1,9 @@
+#!/bin/rc
+
+myip=45.76.231.117
+rimport -a cpu32 /srv
+mount -c /srv/registry /mnt/registry
+hub -b listenftp
+mount /srv/listenftp /n/listenftp
+echo 'gridlisten1 -tv -d gridftp -m /n/gridftp tcp!*!10021 /bin/ip/lftpd -Ae' >>/n/listenftp/io0
+
--- /dev/null
+++ b/09plumber
@@ -1,0 +1,25 @@
+#!/bin/rc
+
+#myip=107.191.50.176
+rimport -a cpu64 /srv
+mount -c /srv/registry /mnt/registry
+mount /srv/gridram /n/gridram
+mount /srv/boot /n/gridroot
+auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+#echo 'none
+#none
+#' | ftpfs tcp!cpu64!10021
+bind -c /n/ftp/incoming /n/gridftp
+bind  /usr/none/incoming /n/griddisk
+bind  /usr/none/incoming /n/gridftp
+cd $home/gridmods
+hub -b listenplumber
+mount /srv/listenplumber /n/listenplumber
+echo 'safeplumber/8.plumber -p gridplumbrules' >>/n/listenplumber/io0
+sleep 1
+chmod 666 /srv/plumb.glenda*
+echo 'gridlisten1 -tv -d gridplumber -m /mnt/plumb tcp!*!9998 /bin/exportfs -S ' /srv/plumb.glenda* >>/n/listenplumber/io0
+hub -b listenplumbertls
+mount /srv/listenplumbertls /n/listenplumbertls
+echo 'gridlisten1 -tv -d gridplumber -m /mnt/plumb tcp!*!19998 tlssrv -A /bin/aux/trampoline tcp!127.1!9998' >>/n/listenplumbertls/io0
--- /dev/null
+++ b/11griddisk
@@ -1,0 +1,14 @@
+#!/bin/rc
+
+#rimport -a $regip /srv /n/regsrv
+#mount -c /n/regsrv/registry /mnt/registry
+#srvfs -p 666 registry /mnt/registry
+mount -c /srv/registry /mnt/registry
+auth/factotum
+#echo 'key proto=dp9ik user=glenda dom=grid !password=9gridchan' >/mnt/factotum/ctl
+hub -b listendisk
+mount /srv/listendisk /n/listendisk
+echo 'gridlisten1 -tv -d griddisk -m /n/griddisk tcp!*!9564 /bin/exportfs -r /usr/none/incoming' >>/n/listendisk/io0
+hub -b listendisktls
+mount /srv/listendisktls /n/listendisktls
+echo 'gridlisten1 -tv -d griddisk -m /n/griddisk tcp!*!19564 tlssrv -A /bin/aux/trampoline tcp!127.1!9564' >>/n/listendisktls/io0
--- /dev/null
+++ b/README.md
@@ -1,0 +1,8 @@
+# Private grid
+This is an in development project based off of mycroftiv's 9gridchan public grid
+
+ACHTUNG!!! This DOES NOT wrok to my I don't care how mush you try - email me for update's or WAIT
+
+When finished, the private grid will offer all the services of the public one (minus the inferno stuff) but in a password protected enviroment
+
+Public grid: http://ants.9gridchan.org/
--- /dev/null
+++ b/initprivategrid
@@ -1,0 +1,27 @@
+#! /bin/rc
+prefix='.'
+while (~ $1 -*){
+	switch($1){
+	case -i
+		inferno = yes
+		shift
+	case -p
+		shift
+		prefix=$1
+		shift
+	case *
+		echo bad flag $1 >>[1=2]
+		shift
+	}
+}
+if($inferno){
+	$prefix/01infernostart
+	$prefix/02infregstart
+	$prefix/03regreg
+}
+$prefix/04chat
+$prefix/05wiki
+$prefix/06ramfs
+$prefix/07gridroot
+$prefix/08ftp
+$prefix/09plumber