-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Use Systemd for Amazon Linux 2 #5387
Conversation
scripts/post-install.sh
Outdated
# Run update-rc.d or fallback to chkconfig if not available | ||
if which update-rc.d &>/dev/null; then | ||
install_update_rcd | ||
if [[ $VERSION_ID = "2" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect that when VERSION_ID=3 is released it will still be using systemd, so maybe we can have the systemd path be default and only do the other methods for VERSION_ID=1 (if there is such a variable)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll switch this around.
07a5cd9
to
10125a2
Compare
Unfortunately, |
e85fde3
to
a9c453f
Compare
I cleaned up the logic a bit. This is ready to merge. |
scripts/post-install.sh
Outdated
@@ -88,7 +88,10 @@ elif [[ -f /etc/debian_version ]]; then | |||
fi | |||
elif [[ -f /etc/os-release ]]; then | |||
source /etc/os-release | |||
if [[ $ID = "amzn" ]]; then | |||
if [[ $NAME = "Amazon Linux" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quote "$NAME"
a9c453f
to
c55e1b5
Compare
(cherry picked from commit 52bd698)
Amazon Linux 2 uses systemd. This PR adds support for Amazon Linux 2 in the Telegraf
post-install.sh
andpost-remove.sh
scripts.closes #5117
Required for all PRs: