hmm, tried it today, verry simple
created an requirements.sh with this as content and did a chmod +x on it 
#!/bin/bash
sudo apk add can-utils
if i run it from putty, then it works, it installs that package
bash /config/python_scripts/requirements.sh
if i run it from the automation
- alias: Dobiss Server
initial_state: 'on'
trigger:
- platform: homeassistant
event: start
action:
- service: shell_command.requirements
shell_command:
requirements: bash /config/python_scripts/requirements.sh
then i receve error below
2021-02-17 09:35:51 ERROR (MainThread) [homeassistant.components.shell_command] Error running command:
bash /config/python_scripts/requirements.sh, return code: 127
if i remove the sudo from the .sh script, i get error 1 instead of error 127
any idea?