Skip to content

Commit

Permalink
chore: cleanup post-install script (#294)
Browse files Browse the repository at this point in the history
Remove keyring pulling from agent post-install scripts.
  • Loading branch information
prichrd authored Jan 10, 2023
1 parent c70255f commit 2e9ef0a
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packaging/scripts/after_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ main() {
userdel -f do-agent || true
useradd -s /bin/false -M --system $USERNAME || true

# TODO remove this if in next release
# temporarily download keys in a GPG keyring for debian based systems.
if command -v apt-get >/dev/null 2>&1; then
REPO_HOST=https://repos.insights.digitalocean.com
REPO_GPG_KEY=${REPO_HOST}/sonar-agent.asc
deb_list=/etc/apt/sources.list.d/digitalocean-agent.list
deb_keyfile=/usr/share/keyrings/digitalocean-agent-keyring.gpg
repo="do-agent"
echo "deb [signed-by=${deb_keyfile}] ${REPO_HOST}/apt/${repo} main main" >"${deb_list}" || true
curl -sL "${REPO_GPG_KEY}" | gpg --dearmor >"${deb_keyfile}" || true
fi

if command -v systemctl >/dev/null 2>&1; then
# systemd is used, remove the upstart script
rm -f "${INIT_SVC_FILE}"
Expand Down

0 comments on commit 2e9ef0a

Please sign in to comment.