Open ygorth opened 12 months ago
I've updated /usr/lib/systemd/system/codedeploy-agent.service removing the option "-a" from /bin/bash, and it is now deleting the folders w/o raising errors.
New codedeploy-agent.service w/o "-a":
$ cat /usr/lib/systemd/system/codedeploy-agent.service
[Unit]
Description=AWS CodeDeploy Host Agent
[Service]
Type=forking
ExecStart=/bin/bash -c '[ -f /etc/profile ] && source /etc/profile; /opt/codedeploy-agent/bin/codedeploy-agent start'
ExecStop=/opt/codedeploy-agent/bin/codedeploy-agent stop
RemainAfterExit=no
Restart=on-failure
# Uncomment the following line to run the agent as the codedeploy user
# Note: The user must first exist on the system
#User=codedeploy
[Install]
WantedBy=multi-user.target
I was trying to go from AL2 to AL2023 and having an issue with any bash script in the appspec. Removing the -a
like you did worked.
[stderr]bash: _parse_usage: line 16: syntax error near unexpected token ('
That's correct @BaconFries. I will run some tests and push a PR later this week.
Specs:
Please review this log generated by the codedeploy-agent, which attempted to delete previous deployment folders based on the specified
max_revisions
number but encountered an error.