Create a WordPress site data with Nginx app data automatically
Shellcheck.net

I strongly recommend to start using https://shellcheck.net/.
Simply copy-paste your script,
and it will tell you many issues with this code.

Don't use return outside of functions

The return statement only works within functions.
You probably meant exit instead:

domain="$1" &amp;&amp; test -z "${domain}" &amp;&amp; exit


Variables in command arguments

Always double-quote variables in command arguments to prevent glob expansion and word splitting, for example:

cat ~/myAddons/nginx_app &gt; "${sava}/${domain}.conf"


Inconsistent paths

Here, the last argument of the second command starts with a /, but not the last argument of the first command:

cat ~/myAddons/nginx_app &gt; ${sava}/${domain}.conf
sed -i "s/\${domain}/${1}/g" /${sava}/${domain}.conf


I suspect the last arguments are intended to be the same in both of these commands. This is confusing.