/usr/share/doc/caspar/csp_helper.txt is in caspar-doc 20140919-1.
This file is owned by root:root, with mode 0o644.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | 19 Sep 2014 csp_helper 20140919
1.
NAME
2.
SYNOPSIS
3.
DESCRIPTION
4.
install DESCRIPTION
5.
install EXAMPLES
6.
install ENVIRONMENT
7.
mkdircp DESCRIPTION
8.
scp_keep_mode DESCRIPTION
9.
scp_keep_mode EXAMPLE
10.
scp_keep_mode ENVIRONMENT
11.
sucp DESCRIPTION
12.
sucp EXAMPLES
13.
AUTHOR
14.
SEE ALSO
NAME
csp_helper — A collection of caspar helper scripts
SYNOPSIS
csp_install dir (directory) file (file)
csp_mkdircp dir (directory) file (file)
csp_scp_keep_mode h ([user@]host) dir (directory) file (file)
csp_sucp h ([user@]host) dir (directory) file (file)
DESCRIPTION
The scripts csp_install, csp_mkdircp, csp_scp_keep_mode and csp_sucp are
helpers for caspar(7). These scripts typically are not invoked directly, but
via a Makefile which uses caspar. See the notes on csp_PUSH in caspar(7) for
information on how to link csp_install, csp_scp_keep_mode and csp_sucp to
caspar.
install DESCRIPTION
csp_install creates the required directory (if needed) and installs the file,
preserving timestamps. It uses install(1).
install EXAMPLES
csp_INSTALL_OPTIONS='--owner=www-data --group=www-data' \ csp_INSTALL_MODE=ugo=
r \ csp_install /srv/www index.html
csp_INSTALL_MODE=u=rwx,go= csp_install /usr/local/sbin mkpasswd
install ENVIRONMENT
csp_install honors csp_INSTALL_OPTIONS and csp_INSTALL_MODE (default is u=rw,go
=r).
mkdircp DESCRIPTION
csp_mkdircp calls mkdir(1) and cp(1). csp_mkdircp is used like csp_CP. use
csp_mkdircp if you frequently have to bootstrap installation on a fresh system,
on which needed directories don't exist yet. csp_mkdircp makes sure the target
directory exists before calling cp(1), by calling mkdir -p first.
scp_keep_mode DESCRIPTION
csp_scp_keep_mode uses ssh to copy a file to a remote host, keeping its file
permission mode. The trick used is a combination of mktemp(1) and mv(1). Useful
if you'd like to be sure a file gets installed e.g. group writable, without
fiddling with permission bits on the remote host.
scp_keep_mode EXAMPLE
chmod g+w rc csp_scp_keep_mode root@gandalf /etc/uruk rc
scp_keep_mode ENVIRONMENT
csp_scp_keep_mode honors csp_SSH ("ssh" by default).
sucp DESCRIPTION
csp_sucp calls tar(1) from within sudo(1) from within ssh(1). This allows one
to copy files to accounts on hosts one can only reach by calling sudo on the
ssh-reachable remote host.
Typically, one wants to install a root-owned file, but one does not want to
allow access to the root-account directly from ssh. Typically sudo is used as
an extra line of defense.
NB: if your sudo prompts for a password, be sure to have line
Defaults !tty_tickets
in your sudoers file: we first call sudo -v, than we call sudo to write the
data. Since we use ssh to get to the host, we'll use a different tty for both
sudo calls.
sucp EXAMPLES
Some examples:
csp_sucp rms@bilbo /etc fstab
csp_sucp monty-python commit/ trailer.txt
AUTHOR
Joost van Baal-Ilić
SEE ALSO
caspar(7) The caspar homepage is at http://mdcc.cx/caspar/ .
|