/usr/lib/picolisp/bin/replica is in picolisp 3.1.5.2-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #!/usr/bin/picolisp /usr/lib/picolisp/lib.l
# Use: bin/replica <port> <keyFile> <journal> <dbFile> <blob/app/> [dbs1 ..]
# : bin/ssl <host> 443 '<port>/!replica' <keyFile> <journal> <blob/app/> 60
(load "@lib/misc.l" "@lib/http.l")
(allow "!replica")
(argv *Port *KeyFile *Journal *Pool *Blob . *Dbs)
(setq
*Port (format *Port)
*SSLKey (in *KeyFile (line T)) )
(de replica ()
(ctl *KeyFile
(protect
(when (= (line T) *SSLKey)
(let? X (line T)
(if (format X)
(when (abort 420 (out (tmp 'replica) (echo @))) # Journal
(prin (peek))
(flush)
(journal (tmp 'replica)) )
(let Blob (pack *Blob X) # Blob
(call 'mkdir "-p" (dirname Blob))
(out Blob (echo)) ) ) ) ) ) ) )
(pool *Pool (mapcar format *Dbs) *Journal)
(server *Port)
|