Compare commits
	
		
			8 Commits
		
	
	
		
			bydir
			...
			ed9ef924d3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						ed9ef924d3
	
				 | 
					
					
						|||
| 
						
						
							
						
						e0be97277a
	
				 | 
					
					
						|||
| 
						
						
							
						
						13253824c6
	
				 | 
					
					
						|||
| 
						
						
							
						
						26ffee17be
	
				 | 
					
					
						|||
| 
						
						
							
						
						f60153aca6
	
				 | 
					
					
						|||
| 
						
						
							
						
						7d66d5c55e
	
				 | 
					
					
						|||
| 
						
						
							
						
						e44620521f
	
				 | 
					
					
						|||
| 
						
						
							
						
						49c1417b8a
	
				 | 
					
					
						
							
								
								
									
										10
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Makefile
									
									
									
									
									
								
							@@ -29,6 +29,12 @@ krovmans = $(krov_docs:krov/%/README.md=$(mandir)/%.6)
 | 
				
			|||||||
$(mandir)/%.6: krov/%/README.md
 | 
					$(mandir)/%.6: krov/%/README.md
 | 
				
			||||||
	lowdown -stman $< > $@
 | 
						lowdown -stman $< > $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					splint_docs != grep -rl "^section:" splintrs
 | 
				
			||||||
 | 
					splintmans = $(splint_docs:splintrs/%/README.md=$(mandir)/%.6)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(mandir)/%.6: splintrs/%/README.md
 | 
				
			||||||
 | 
						lowdown -stman $< > $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
setup_docs != grep -rl "^section:" setup 
 | 
					setup_docs != grep -rl "^section:" setup 
 | 
				
			||||||
setupmans = $(setup_docs:setup/%.md=$(mandir)/%.6)
 | 
					setupmans = $(setup_docs:setup/%.md=$(mandir)/%.6)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -38,10 +44,10 @@ $(mandir)/%.6: setup/%.md
 | 
				
			|||||||
$(mandir):
 | 
					$(mandir):
 | 
				
			||||||
	mkdir -p $@
 | 
						mkdir -p $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(kralmans) $(krovmans) $(setupmans) :| $(mandir)
 | 
					$(kralmans) $(krovmans) $(splintmans) $(setupmans) :| $(mandir)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: pages
 | 
					.PHONY: pages
 | 
				
			||||||
pages: $(kralmans) $(krovmans) $(setupmans)
 | 
					pages: $(kralmans) $(krovmans) $(setupmans) $(splintmans)
 | 
				
			||||||
	$(info $(kralmans))
 | 
						$(info $(kralmans))
 | 
				
			||||||
	@test ! $(command -v mandb) || mandb --user-db
 | 
						@test ! $(command -v mandb) || mandb --user-db
 | 
				
			||||||
	$(info Open DMZ's man pages with 'man 6 <tab>')
 | 
						$(info Open DMZ's man pages with 'man 6 <tab>')
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										31
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								README.md
									
									
									
									
									
								
							@@ -15,3 +15,34 @@ These setup files provide the text-only configurations for DMZ.
 | 
				
			|||||||
- Any maintenance scripts.
 | 
					- Any maintenance scripts.
 | 
				
			||||||
- Configurations should reside in shadow-directories, e.g. a backup `soft-serve`'s `config.yaml` should reside in this repo under `splint.rs/soft-serve/etc/soft/config.yaml`.
 | 
					- Configurations should reside in shadow-directories, e.g. a backup `soft-serve`'s `config.yaml` should reside in this repo under `splint.rs/soft-serve/etc/soft/config.yaml`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Network Database
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					I have a half-baked plan to finally make use of plain-text databases, and it's already half-working.
 | 
				
			||||||
 | 
					Try these commands:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Ask what types of _rec_ords it contains:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sh
 | 
				
			||||||
 | 
					recinf network.rec
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sh
 | 
				
			||||||
 | 
					recsel network.rec --type router
 | 
				
			||||||
 | 
					recsel network.rec --include-descriptors --type lxc
 | 
				
			||||||
 | 
					recsel network.rec -d -t lxc
 | 
				
			||||||
 | 
					recsel network.rec -d -t lxc --expression
 | 
				
			||||||
 | 
					recsel network.rec -t lxc --expression "name ~ 'nginx'"
 | 
				
			||||||
 | 
					recsel network.rec -t lxc --expression "name = 'nginx12'"
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you can select something, you can also set its fields with `recset`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Use `-f` to set the field, and `-a` to add, or `-s` to set.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sh
 | 
				
			||||||
 | 
					recset network.rec -t lxc --expression "name = 'nginx12'" -f proxies --add soft-serve
 | 
				
			||||||
 | 
					recsel network.rec -t lxc --expression "name = 'nginx11'" -p proxies[0]
 | 
				
			||||||
 | 
					recset network.rec -t lxc --expression "name = 'nginx11'" -f proxies[0] -s wiki9
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										87
									
								
								network.rec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								network.rec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,87 @@
 | 
				
			|||||||
 | 
					%rec: router
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: ISP Router
 | 
				
			||||||
 | 
					location: kralizec
 | 
				
			||||||
 | 
					ISP: Orion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: ISP Router
 | 
				
			||||||
 | 
					location: krov
 | 
				
			||||||
 | 
					ISP: Yettel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%rec: host
 | 
				
			||||||
 | 
					%doc: These are the real machines, most of which virtualise.
 | 
				
			||||||
 | 
					%key: name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: moxx
 | 
				
			||||||
 | 
					location: kralizec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: Serverko
 | 
				
			||||||
 | 
					location: krov
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%rec: lxc
 | 
				
			||||||
 | 
					%doc: A container, usually on a Proxmox host
 | 
				
			||||||
 | 
					%type: host rec host
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: nginx11
 | 
				
			||||||
 | 
					gateway: ISP-router
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					proxies: wiki11
 | 
				
			||||||
 | 
					proxies: gitea11
 | 
				
			||||||
 | 
					proxies: forum11
 | 
				
			||||||
 | 
					proxies: ejabberd11
 | 
				
			||||||
 | 
					proxies: dmzrs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: LDAP
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: website
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					authqueries: LDAP
 | 
				
			||||||
 | 
					queries: postgresql11
 | 
				
			||||||
 | 
					service: dmzrs
 | 
				
			||||||
 | 
					service: flask accounts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: gitea11
 | 
				
			||||||
 | 
					service: gitea
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					authqueries: LDAP
 | 
				
			||||||
 | 
					queries: postgresql11
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: ejabberd11
 | 
				
			||||||
 | 
					service: ejabberd
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					authqueries: LDAP
 | 
				
			||||||
 | 
					queries: postgresql11
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: forum11
 | 
				
			||||||
 | 
					service: forum
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					authqueries: LDAP
 | 
				
			||||||
 | 
					queries: postgresql11
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: postfix11
 | 
				
			||||||
 | 
					service: postfix
 | 
				
			||||||
 | 
					authqueries: LDAP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: tor11
 | 
				
			||||||
 | 
					service: tor
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: postgresql11
 | 
				
			||||||
 | 
					service: postgresql
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: wiki11
 | 
				
			||||||
 | 
					service: wiki
 | 
				
			||||||
 | 
					host: moxx
 | 
				
			||||||
 | 
					authqueries: LDAP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: nginx12
 | 
				
			||||||
 | 
					host: Serverko
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: nextcloud
 | 
				
			||||||
 | 
					host: Serverko
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: tor12
 | 
				
			||||||
 | 
					host: nginx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1,62 +0,0 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# If you want to add these passwords to the `pass` program, you can
 | 
					 | 
				
			||||||
# symlink all the passwords which you can open, then open the
 | 
					 | 
				
			||||||
# passwords with a script like this.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
pass_store=~/.password-store
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# THIS_PLACE="$PWD"
 | 
					 | 
				
			||||||
# mkdir $pass_store/dmz
 | 
					 | 
				
			||||||
# cd !$
 | 
					 | 
				
			||||||
# find  "$THIS_PLACE" -type f -name "*.gpg" | \ 
 | 
					 | 
				
			||||||
#     sed "s#/home/ghost#../..#" | \ 
 | 
					 | 
				
			||||||
#     while read -r line; do
 | 
					 | 
				
			||||||
#         gpg -d "$line" && ln -sf "$line" .
 | 
					 | 
				
			||||||
#     done
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
sanity_check(){
 | 
					 | 
				
			||||||
    command -v $1 >/dev/null || (
 | 
					 | 
				
			||||||
        echo "You must install $1"
 | 
					 | 
				
			||||||
        exit 1
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set_selector_if_program_exists(){
 | 
					 | 
				
			||||||
    command -v "$1" > /dev/null  && selector="$1 $2"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ -z "$DISPLAY" ]; then
 | 
					 | 
				
			||||||
    set_selector_if_program_exists sk || \
 | 
					 | 
				
			||||||
        set_selector_if_program_exists fzy || \
 | 
					 | 
				
			||||||
        set_selector_if_program_exists fzf
 | 
					 | 
				
			||||||
    fail_sender='echo'
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
    set_selector_if_program_exists "rofi" 'rofi -dmenu "$@"' || \
 | 
					 | 
				
			||||||
        set_selector_if_program_exists dmenu || \
 | 
					 | 
				
			||||||
        (
 | 
					 | 
				
			||||||
            echo "Cannot find anything to select a key. Install dmenu." 
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
    fail_sender='notify-send'
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
list_keys(){
 | 
					 | 
				
			||||||
    find -L . -mindepth 1 -type f -name "*.gpg" | \
 | 
					 | 
				
			||||||
        sed 's/\.\///' | \
 | 
					 | 
				
			||||||
        sed 's/.gpg//'
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
####################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -e
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
sanity_check pass
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
cd "$pass_store"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
password="$(list_keys | $selector)"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
pass -c "$password" || $fail_sender 'Cannot decrypt'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					source: Decentrala
 | 
				
			||||||
 | 
					section: 6
 | 
				
			||||||
 | 
					title: Soft-Serve Basics
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Soft Serve has its configurations stored inside itself in a repo.  Admins can pull:
 | 
					Soft Serve has its configurations stored inside itself in a repo.  Admins can pull:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
`git clone ssh://soft.dmz.rs:2222/.soft-serve`
 | 
					`git clone ssh://soft.dmz.rs:2222/.soft-serve`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					source: Decentrala
 | 
				
			||||||
 | 
					section: 6
 | 
				
			||||||
 | 
					title: Soft-Serve Webhooks
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Soft serve webhooks
 | 
					### Soft serve webhooks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Soft serve supports [webhooks](https://en.wikipedia.org/wiki/Webhook)
 | 
					Soft serve supports [webhooks](https://en.wikipedia.org/wiki/Webhook)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user