Change user agent string for docker refresh

This commit is contained in:
Mike Reeves
2020-11-13 13:39:52 -05:00
parent adec9ad48b
commit 09f3199cc2
2 changed files with 10 additions and 1 deletions

View File

@@ -45,4 +45,5 @@ version_check
HOSTNAME=$(hostname) HOSTNAME=$(hostname)
# List all the containers # List all the containers
container_list container_list
CURLTYPE=refresh
update_docker_containers update_docker_containers

View File

@@ -87,6 +87,14 @@ container_list() {
fi fi
} }
operating_system() {
if [ -f /etc/redhat-release ]; then
OS=CentOS
else
OS=Ubuntu
fi
}
update_docker_containers() { update_docker_containers() {
# Let's make sure we have the public key # Let's make sure we have the public key
curl -sSL https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS | gpg --import - curl -sSL https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS | gpg --import -
@@ -106,7 +114,7 @@ update_docker_containers() {
docker pull $CONTAINER_REGISTRY/$IMAGEREPO/$i:$VERSION docker pull $CONTAINER_REGISTRY/$IMAGEREPO/$i:$VERSION
# Get signature # Get signature
curl https://sigs.securityonion.net/$VERSION/$i:$VERSION.sig --output $SIGNPATH/$i:$VERSION.sig curl -A "$OS $CURLTYPE" https://sigs.securityonion.net/$VERSION/$i:$VERSION.sig --output $SIGNPATH/$i:$VERSION.sig
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "Unable to pull signature file for $i:$VERSION" echo "Unable to pull signature file for $i:$VERSION"
exit 1 exit 1