Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes to agent installation #24

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Environment="AWS_TOKEN=file:///var/run/awssmatoken"
Type=exec
Restart=always
TimeoutSec=1min
ExecStart=/opt/aws/secretsmanageragent/bin/aws-secrets-manager-agent
ExecStart=/opt/aws/secretsmanageragent/bin/aws_secretsmanager_agent

[Install]
WantedBy=multi-user.target
5 changes: 3 additions & 2 deletions aws_secretsmanager_agent/configuration/install
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PATH=/bin:/usr/bin:/sbin:/usr/sbin # Use a safe path

AGENTDIR=/opt/aws/secretsmanageragent
AGENTBIN=aws-secrets-manager-agent
AGENTBIN=aws_secretsmanager_agent
TOKENGROUP=awssmatokenreader
AGENTUSER=awssmauser
TOKENSCRIPT=awssmaseedtoken
Expand All @@ -27,11 +27,12 @@ if [ ! -r ${AGENTBIN} ]; then
fi

groupadd -f ${TOKENGROUP}
useradd -r -m -g ${TOKENGROUP} -d ${AGENTDIR} ${AGENTUSER}
useradd -r -m -g ${TOKENGROUP} -d ${AGENTDIR} ${AGENTUSER} || true
chmod 755 ${AGENTDIR}

install -D -T -m 755 ${AGENTBIN} ${AGENTDIR}/bin/${AGENTBIN}
install -D -T -m 755 ${TOKENSCRIPT} ${AGENTDIR}/bin/${TOKENSCRIPT}
chown -R ${AGENTUSER} ${AGENTDIR}
install -T -m 755 ${TOKENSCRIPT}.service ${SYSTEMDFILES}/${TOKENSCRIPT}.service
install -T -m 755 ${AGENTSCRIPT}.service ${SYSTEMDFILES}/${AGENTSCRIPT}.service

Expand Down
Loading