[ZBX-22823] Zabbix runs scripts using sh even though shebang says bash Created: 2023 May 19  Updated: 2024 Apr 10  Resolved: 2023 Jun 09

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D)
Affects Version/s: 6.0.16
Fix Version/s: 6.0.19rc1, 6.4.4rc1, 7.0.0alpha2, 7.0 (plan)

Type: Documentation task Priority: Major
Reporter: Grzegorz Lachowski Assignee: Lidija Marsova (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 22.04


Attachments: PNG File image-2023-05-19-14-59-52-747.png     PNG File image-2023-05-19-15-00-32-425.png    
Team: Team D
Sprint: Sprint 101 (Jun 2023)
Story Points: 0.2

 Description   

Steps to reproduce:

  1. Create a script with shebang #!/bin/bash

  1. Add it to an Action

Result:

Expected:
Script is run with bash.



 Comments   
Comment by Edgar Akhmetshin [ 2023 May 24 ]

Hello Grzegorz,

https://www.zabbix.com/documentation/6.0/en/manual/appendix/command_execution
https://www.zabbix.com/documentation/6.0/en/manual/web_interface/frontend_sections/administration/scripts

It's not mentioned or allowed to modify the the default shell invocation.

If you need this - create script file and call this script within command execution.

Documentation can be improved, confirming to improve description.

Regards,
Edgar

Comment by Lidija Marsova (Inactive) [ 2023 Jun 08 ]

Documentation updated: Command execution in 6.0, 6.4, and 7.0.

Generated at Sat Apr 26 03:31:53 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.