2021-03-29 11:13:57 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
# Collector install script
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2021 Cisco Systems, Inc. and Tim Evens. All rights reserved.
|
|
|
|
|
#
|
|
|
|
|
# Author: Tim Evens <tim@openbmp.org>
|
|
|
|
|
|
|
|
|
|
# Add build details
|
2022-01-28 15:12:01 -08:00
|
|
|
touch /usr/local/version-${VERSION}
|
2021-03-29 11:13:57 -07:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Defaults
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Disable interactive
|
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
|
|
# Install base packages
|
|
|
|
|
apt-get update
|
|
|
|
|
|
|
|
|
|
# Fix ubuntu docker install
|
|
|
|
|
#sed -i 's/exit 101/exit 0/' /usr/sbin/policy-rc.d
|
|
|
|
|
|
|
|
|
|
# General depend install
|
|
|
|
|
apt-get install -y iproute2 wget zlib1g libssl1.1 libsasl2-2
|
|
|
|
|
|
|
|
|
|
# --
|
|
|
|
|
# -- Add host entries for reverse PTR lookups
|
|
|
|
|
# --
|
|
|
|
|
if [[ -f /config/hosts ]]; then
|
|
|
|
|
cat /config/hosts >> /etc/hosts
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# --
|
|
|
|
|
# -- Clean up
|
|
|
|
|
# --
|
|
|
|
|
apt-get clean
|
|
|
|
|
rm -rf /var/lib/apt/lists/* /var/tmp/*
|
|
|
|
|
rm -f /tmp/install
|