-
Notifications
You must be signed in to change notification settings - Fork 108
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
Conversation
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.
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.
Looks good to me
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.
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.
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` |
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.
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.
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.