blob: d12b860e7fcb00b09cc3c458bf818a3bd317c35d (
plain)
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
|
#!/usr/bin/env bash
set -euo pipefail
case ${USER} in
root)
exec su --shell /bin/bash --command "$0 $@" gvm
;;
gvm)
;;
*)
>&2 echo "Must be run as root or gvm user not ${USER}"
exit 1
;;
esac
while getopts d OPTION "$@"; do
case ${OPTION} in
d)
set -x
;;
esac
done
shift $((OPTIND - 1))
greenbone-nvt-sync
# Note that Greenbone recommends to sync CERT *after* SCAP, as the
# former depends on the later. See
# https://github.com/greenbone/gvmd/blob/main/INSTALL.md#keeping-the-feeds-up-to-date
for FEED_TYPE in SCAP CERT GVMD_DATA; do
greenbone-feed-sync --type ${FEED_TYPE}
done
|