documentation: use actual path for ssh_filter_btrbk

In it’s manpage, use the actual installation pathname of `ssh_filter_btrbk.sh`.

In `README.md`, which should be readable without building, use the usual
pathname, which is `/usr/share/btrbk/scripts/ssh_filter_btrbk.sh`.

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
pull/504/head
Christoph Anton Mitterer 2022-11-15 23:33:48 +01:00
parent 9d0468070d
commit 8cc97b429c
3 changed files with 11 additions and 4 deletions

View File

@ -555,14 +555,14 @@ to run it whenever the key is used for authentication. Example
"/root/.ssh/authorized_keys": "/root/.ssh/authorized_keys":
# example backup source (also allowing deletion of old snapshots) # example backup source (also allowing deletion of old snapshots)
command="/backup/scripts/ssh_filter_btrbk.sh -l --source --delete",restrict <pubkey>... command="/usr/share/btrbk/scripts/ssh_filter_btrbk.sh -l --source --delete",restrict <pubkey>...
# example backup target (also allowing deletion of old snapshots) # example backup target (also allowing deletion of old snapshots)
command="/backup/scripts/ssh_filter_btrbk.sh -l --target --delete",restrict <pubkey>... command="/usr/share/btrbk/scripts/ssh_filter_btrbk.sh -l --target --delete",restrict <pubkey>...
# example fetch-only backup source (snapshot_preserve_min=all, snapshot_create=no), # example fetch-only backup source (snapshot_preserve_min=all, snapshot_create=no),
# restricted to subvolumes within /home or /data # restricted to subvolumes within /home or /data
command="/backup/scripts/ssh_filter_btrbk.sh -l --send -p /home -p /data",restrict <pubkey>... command="/usr/share/btrbk/scripts/ssh_filter_btrbk.sh -l --send -p /home -p /data",restrict <pubkey>...
[ssh_filter_btrbk(1)]: https://digint.ch/btrbk/doc/ssh_filter_btrbk.1.html [ssh_filter_btrbk(1)]: https://digint.ch/btrbk/doc/ssh_filter_btrbk.1.html

View File

@ -10,6 +10,7 @@ PREFIX ?= /usr
DOCDIR = $(PREFIX)/share/doc/$(PN) DOCDIR = $(PREFIX)/share/doc/$(PN)
MAN1DIR = $(PREFIX)/share/man/man1 MAN1DIR = $(PREFIX)/share/man/man1
MAN5DIR = $(PREFIX)/share/man/man5 MAN5DIR = $(PREFIX)/share/man/man5
SCRIPTDIR ?= $(PREFIX)/share/$(PN)/scripts
ifeq ($(COMPRESS), yes) ifeq ($(COMPRESS), yes)
DOCS := $(addsuffix .gz,$(DOCS)) DOCS := $(addsuffix .gz,$(DOCS))
@ -17,6 +18,9 @@ ifeq ($(COMPRESS), yes)
MAN_MAN5 := $(addsuffix .gz,$(MAN_MAN5)) MAN_MAN5 := $(addsuffix .gz,$(MAN_MAN5))
endif endif
replace_vars = sed \
-e "s|@SCRIPTDIR@|$(SCRIPTDIR)|g"
# convert using "asciidoctor": <https://asciidoctor.org> # convert using "asciidoctor": <https://asciidoctor.org>
ASCIIDOCTOR_MANPAGE = asciidoctor -d manpage -b manpage ASCIIDOCTOR_MANPAGE = asciidoctor -d manpage -b manpage
ASCIIDOCTOR_HTML = asciidoctor -b html5 -d article ASCIIDOCTOR_HTML = asciidoctor -b html5 -d article
@ -57,3 +61,6 @@ clean:
%.html : %.asciidoc %.html : %.asciidoc
SOURCE_DATE_EPOCH=$(call source_date_epoch,$<) $(ASCIIDOCTOR_HTML) -o $@ $< SOURCE_DATE_EPOCH=$(call source_date_epoch,$<) $(ASCIIDOCTOR_HTML) -o $@ $<
%.asciidoc : %.asciidoc.in
$(replace_vars) ssh_filter_btrbk.1.asciidoc.in > ssh_filter_btrbk.1.asciidoc

View File

@ -45,7 +45,7 @@ The following commands are always allowed:
Example line in /root/.ssh/authorized_keys on a backup target host: Example line in /root/.ssh/authorized_keys on a backup target host:
command="ssh_filter_btrbk.sh --target --delete --restrict-path /mnt/btr_backup",restrict ssh-rsa AAAAB3NzaC1...hwumXFRQBL btrbk@example.org command="@SCRIPTDIR@/ssh_filter_btrbk.sh --target --delete --restrict-path /mnt/btr_backup",restrict ssh-rsa AAAAB3NzaC1...hwumXFRQBL btrbk@example.org
OPTIONS OPTIONS