init.d/codedeploy-agent.service
[Unit]
Description=AWS CodeDeploy Host Agent
[Service]
Type=forking
After=network.target
ExecStart=/bin/bash -a -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