~kris/9p

krisyotam.net

5487c7217667ccb582ada20ed17aec2ef38e18f3 — Kris Yotam 3 months ago a21515a
wip: emergency backup (power outage risk)
M bin/contrib/rc-httpd/rc-httpd => bin/contrib/rc-httpd/rc-httpd +1 -1
@@ 1,5 1,5 @@
#!/bin/rc
rc_httpd_dir=/home/krisyotam/dev/plan9.krisyotam.com/bin/contrib/rc-httpd
rc_httpd_dir=/home/krisyotam/src/plan9.krisyotam.com/bin/contrib/rc-httpd
libdir = $rc_httpd_dir/lib
path=($PLAN9/bin $rc_httpd_dir/handlers $PATH)
cgi_path=$PLAN9/bin

M bin/contrib/rc-httpd/select-handler => bin/contrib/rc-httpd/select-handler +2 -2
@@ 3,8 3,8 @@ rfork n

if(~ $SERVER_NAME *){
	PATH_INFO=$location
	FS_ROOT=/home/krisyotam/dev/plan9.krisyotam.com/sites/$SERVER_NAME
	exec static-or-cgi /home/krisyotam/dev/plan9.krisyotam.com/bin/werc.rc
	FS_ROOT=/home/krisyotam/src/plan9.krisyotam.com/sites/$SERVER_NAME
	exec static-or-cgi /home/krisyotam/src/plan9.krisyotam.com/bin/werc.rc
}
if not
	error 503

M etc/initrc.local => etc/initrc.local +1 -1
@@ 2,4 2,4 @@ plan9port=/usr/lib/plan9
masterSite=plan9.krisyotam.com
siteTitle='plan9.krisyotam.com'
siteSubTitle='- tools, patches, notes'
debug=false
debug=()

A images/images => images/images +1 -0
@@ 0,0 1,1 @@
/home/krisyotam/src/plan9.krisyotam.com/images
\ No newline at end of file

A pub/favicon.ico => pub/favicon.ico +0 -0
A pub/favicon.png => pub/favicon.png +0 -0
M serve.py => serve.py +9 -0
@@ 14,6 14,15 @@ class WercHandler(http.server.BaseHTTPRequestHandler):
    def do_GET(self):
        # Serve static files from pub/
        parsed = urllib.parse.urlparse(self.path)
        if parsed.path == "/favicon.ico":
            fpath = os.path.join(WERC_ROOT, "pub", "favicon.ico")
            if os.path.isfile(fpath):
                self.send_response(200)
                self.send_header("Content-Type", "image/x-icon")
                self.end_headers()
                with open(fpath, "rb") as f:
                    self.wfile.write(f.read())
                return
        if parsed.path.startswith("/pub/") or parsed.path.startswith("/images/"):
            fpath = os.path.join(WERC_ROOT, parsed.path.lstrip("/"))
            if os.path.isfile(fpath):

M serve.rc => serve.rc +3 -2
@@ 7,14 7,15 @@ port=$1
if(~ $#port 0)
	port=8000

werc_root=/home/krisyotam/dev/plan9.krisyotam.com
werc_root=/home/krisyotam/src/plan9.krisyotam.com
path=($PLAN9/bin $werc_root/bin $werc_root/bin/contrib .)

fn handler {
	SERVER_NAME=plan9.krisyotam.com \
	SERVER_PORT=$port \
	REQUEST_METHOD=GET \
	$PLAN9/bin/rc $werc_root/bin/contrib/rc-httpd/rc-httpd
	$PLAN9/bin/rc $werc_root/bin/contrib/rc-httpd/rc-httpd \
	>[2]/dev/null
}

echo serving plan9.krisyotam.com on port $port

M sites/plan9.krisyotam.com/_werc/config => sites/plan9.krisyotam.com/_werc/config +0 -1
@@ 1,4 1,3 @@
masterSite=plan9.krisyotam.com
siteTitle='krisyotam.net'
siteSubTitle='- tools, patches, notes'
conf_enable_duckduckgo

M sites/plan9.krisyotam.com/blogroll.md => sites/plan9.krisyotam.com/blogroll.md +9 -9
@@ 3,12 3,12 @@ Blogroll

People doing work worth reading.

- [cat-v.org](http://cat-v.org) - founded by Uriel (1979-2012), the archive that started it all ★
- [Drew DeVault](https://drewdevault.com) - SourceHut, Hare language, Alpine Linux
- [Hiltjo Posthuma](https://codemadness.org) - sfeed, stagit, saait ★
- [Ori Bernstein](https://ori-b.net) - Myrddin language, 9front contributor ★
- [Peter Mikkelsen](https://pmikkelsen.com) - APL9, PProlog, 9front
- [Rob Pike](http://herpolhode.com/rob/) - Plan 9, Go, UTF-8
- [Russ Cox](https://swtch.com/~rsc/) - Plan 9 from User Space, Go, RE2
- [Sigrid](https://ftrv.se) - 9front developer, media and graphics
- [Stanley Lieber](http://stanleylieber.com) - 9front, comics, music
- cat-v.org ([site](http://cat-v.org), [git](http://code.cat-v.org)) - founded by Uriel (1979-2012), the archive that started it all ★
- Drew DeVault ([site](https://drewdevault.com), [git](https://git.sr.ht/~sircmpwn)) - SourceHut, Hare language, Alpine Linux
- Hiltjo Posthuma ([site](https://codemadness.org), [git](https://git.codemadness.org)) - sfeed, stagit, saait ★
- Ori Bernstein ([site](https://ori-b.net), [git](https://github.com/oridb)) - Myrddin language, 9front contributor ★
- Peter Mikkelsen ([site](https://pmikkelsen.com), [git](https://github.com/peterfmikkelsen)) - APL9, PProlog, 9front
- Rob Pike ([site](http://herpolhode.com/rob/), [git](https://github.com/robpike)) - Plan 9, Go, UTF-8
- Russ Cox ([site](https://swtch.com/~rsc/), [git](https://github.com/rsc)) - Plan 9 from User Space, Go, RE2
- Sigrid ([site](https://ftrv.se), [git](https://git.sr.ht/~ft), [shithub](https://shithub.us/sigrid)) - 9front developer, media and graphics
- Stanley Lieber ([site](http://stanleylieber.com), [git](https://shithub.us/sl)) - 9front, comics, music

A sites/plan9.krisyotam.com/images/plan9-cirno.jpeg => sites/plan9.krisyotam.com/images/plan9-cirno.jpeg +0 -0