Here's the script:
#!/usr/bin/env ruby
CODES = {}
puts "ok"
Under root
user everything is fine:
# ./test.rb
ok
When munin
's default interpreter is /bin/false
nothing is happpening:
# su munin -c ./test.rb
When default interpreter is /bin/sh
, it is always being used:
# su munin -c ./test.rb
./test.rb: line 3: CODES: command not found
Why under munin
user Linux ignores the interpreter line from the script, while under root
it works as usual?
Update. Finally it just started to work without any intentional fix from me.