mirror of
https://github.com/amidaware/rmmagent.git
synced 2026-04-26 06:45:48 +03:00
[GH-ISSUE #71] macOS agent fails to execute shell scripts - missing shell interpreter invocation #43
Labels
No labels
bug
bug
enhancement
fixed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rmmagent#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @probs-caffeinated on GitHub (Feb 7, 2026).
Original GitHub issue: https://github.com/amidaware/rmmagent/issues/71
It seems the TRMM agent (v 2.9.1) on macOS doesn't invoke shell scripts through a shell interpreter - it tries to execute them directly with execve(), which fails without a shebang.
macOS Agent calls execve() directly on .sh files instead of /bin/sh
@wh1te909 commented on GitHub (Feb 9, 2026):
This is the expected behavior. On linux and macos, the shebang is required for executable scripts. Without it, the agent has no way to determine which interpreter should be used, so execution will fail. The shebang path must exist on the endpoint for the script to run successfully.
The “Shell Type” setting in the UI is only used for syntax highlighting and does not affect how the script is executed. The agent intentionally invokes the file directly rather than wrapping it with /bin/sh, as this allows you to run scripts written in any language available on the endpoint, not just bash or sh.