Do these commands produce same behaviour?

As per title:

/var/lib/asterisk/bin/module_admin upgradeall

amportal a ma upgradeall

same question for:

/var/lib/asterisk/bin/module_admin reload

amportal a r

Yes they do…

It’s strange…as both tried into a shell script executed by root, only /var/lib/asterisk/bin/module_admin upgradeall works … amportal etc etc produce nothing and without any message in any log…
Thank you anyway

In your bash script you would need to include the full bath of amportal for the command to work in bash.