File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -e
3+
24export OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B
3- export OSQUERY_REPO=" deb [arch=amd64] https://pkg.osquery.io/deb deb main"
45
5- # Download and add the GPG key
6- curl -sSL https://pkg.osquery.io/deb/pubkey.gpg | sudo apt-key add -
6+ # Create keyrings directory if it doesn't exist
7+ sudo mkdir -p /etc/apt/keyrings
8+
9+ # Download and add the GPG key using modern method
10+ curl -sSL https://pkg.osquery.io/deb/pubkey.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/osquery.gpg
11+
12+ # Set proper permissions on the keyring
13+ sudo chmod 644 /etc/apt/keyrings/osquery.gpg
714
8- # Add the repository
9- echo " $OSQUERY_REPO " | sudo tee /etc/apt/sources.list.d/osquery.list
15+ # Add the repository with signed-by directive
16+ echo " deb [arch=amd64 signed-by=/etc/apt/keyrings/osquery.gpg] https://pkg.osquery.io/deb deb main " | sudo tee /etc/apt/sources.list.d/osquery.list
1017
1118# Update and install
1219sudo apt-get update
Original file line number Diff line number Diff line change 66 name :
77 - software-properties-common
88 - curl
9+ - gnupg
910 state : present
1011 update_cache : true
1112
You can’t perform that action at this time.
0 commit comments