Post-creation command failed : (does that expect something?)

I run some commands when creating a domain using the:

Virtualmin > System Settings > Virtualmin Configuration > Command to run after making changes to a server

I run several things like this:

[ "$VIRTUALSERVER_ACTION" = "CREATE_DOMAIN" ] && virtualmin modify-user --domain "$VIRTUALSERVER_DOM" --user "$VIRTUALSERVER_USER" --disable-email 
&& virtualmin modify-mail --domain "$VIRTUALSERVER_DOM" --outgoing-ip 
&& virtualmin install-script --domain "$VIRTUALSERVER_DOM" --type roundcube --version 1.6.11 --path / --db mysql "${VIRTUALSERVER_DB}" 
&& /usr/local/bin/roundcube-script.py "$VIRTUALSERVER_DOM" ; 
[ "$VIRTUALSERVER_ACTION" = "DELETE_DOMAIN" ] && /usr/local/bin/removed-domain-script.py "$VIRTUALSERVER_DOM" "$VIRTUALSERVER_ID" 

I always get a “Post-creation command failed” message", followed by the output of each of the commands that that runs (all successful).

Do my external scripts maybe need to return some kind of “success” message to Virtualmin to let it know that they worked in order that it not say that they failed in computer-speak, not just in the English output they write now?

Or am I just missing something?

Thanks.

SYSTEM INFORMATION
OS type and version Ubuntu 24.04
Virtualmin version 7.40.1

They would need to exit with a 0 exit status.

Exit status can be checked in the shell with echo $? immediately after running a command…since any command that runs has an exit value, even running echo $? a second time is showing you the exit status of the previous echo command. You could also capture that value in a variable. Since you have several commands running here connected with &&, and you see the last command run, I think that means it must be the last one that’s exiting with a non-zero status.

Got it, thank you.