Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation: use actual path for ssh_filter_btrbk #504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,14 +555,14 @@ to run it whenever the key is used for authentication. Example
"/root/.ssh/authorized_keys":

# 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)
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),
# 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
Expand Down
7 changes: 7 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ PREFIX ?= /usr
DOCDIR = $(PREFIX)/share/doc/$(PN)
MAN1DIR = $(PREFIX)/share/man/man1
MAN5DIR = $(PREFIX)/share/man/man5
SCRIPTDIR ?= $(PREFIX)/share/$(PN)/scripts

ifeq ($(COMPRESS), yes)
DOCS := $(addsuffix .gz,$(DOCS))
MAN_MAN1 := $(addsuffix .gz,$(MAN_MAN1))
MAN_MAN5 := $(addsuffix .gz,$(MAN_MAN5))
endif

replace_vars = sed \
-e "s|@SCRIPTDIR@|$(SCRIPTDIR)|g"

# convert using "asciidoctor": <https://asciidoctor.org>
ASCIIDOCTOR_MANPAGE = asciidoctor -d manpage -b manpage
ASCIIDOCTOR_HTML = asciidoctor -b html5 -d article
Expand Down Expand Up @@ -57,3 +61,6 @@ clean:

%.html : %.asciidoc
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The following commands are always allowed:

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
Expand Down