blob: 2ff5c1aa6358f03146ea01a97f9e66153f4ffea3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
# rsync plugin
#
# ENVIRONMENT VARIABLES:
# URL URL to download known_hosts file from
# SIGURL URL of the OpenPGP signature
# KEYRING path to the OpenPGP keyring with certificates
#
set -e
ln -f current new || true
rsync -vt --timeout=300 "${URL}" new
if [ "${SIGURL}" ]; then
rsync -vt --timeout=300 "${SIGURL}" new.sig
gpgv --keyring "${KEYRING}" --status-fd 2 new.sig || exit 1
# return 1 because it's not clear what other codes may used
fi
# vim:set ft=sh:
|