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

Updated agent installer to actually work for 32bit #171

Merged
merged 5 commits into from
Jun 21, 2017
Merged

Updated agent installer to actually work for 32bit #171

merged 5 commits into from
Jun 21, 2017

Conversation

docdawning
Copy link
Contributor

Due to Issue #170, I've added some logic that'll change the systemd service that gets setup to call the 'amonagent32' binary rather than 'amonagent' for "i686" architectures. Not entirely pretty, but, it's better than failing as it does now.

Due to Issue #170, I've added some logic that'll change the systemd service that gets setup to call the 'amonagent32' binary rather than 'amonagent' for "i686" architectures. Not entirely pretty, but, it's better than failing as it does now.
"The binary for the agent is located in /usr/local/bin/amonagent", was not true for me when I installed. In my case it went to /usr/bin/amonagent.
Added installer check for debian that will lead to the unsupported message if on an architecture for which there isn't a suitable amonagent binary. I'm doing this because the installer ran fine on my armv7l machine, but the amonagent binary will not execute on it, nor would amonagent32 (obviously).

Adjusted string comparison expressions to be more robust (if [ $DISTRO == "astring"] is not as good as if [ "$DISTRO" == "astring"] because when DISTRO is undefined, bash will crap its pants.
Copy link
Contributor Author

@docdawning docdawning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Contributor Author

@docdawning docdawning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment about amonagent could be in /usr/bin/, as, that's where it went for me.

Decided the string comparisons ought to all use double-quotes.
@martinrusev martinrusev merged commit aa8d2e3 into amonapp:master Jun 21, 2017
@docdawning docdawning deleted the patch-2 branch June 21, 2017 20:38
printf "\033[92m\n* Installing the Amon Agent package for Debian distros\n\033[0m\n"

$sudo_cmd apt-get install -y --force-yes amonagent

#Added in reply to https://github.com/amonapp/amon/issues/170
ARCHITECTURE=`uname -m`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a check above for the ARCHITECTURE yet it isn't set until here?

This is causing installs to not work at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants