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 |