STNORESTART and systemd

Right now, when using systemd, you can set STNORESTART and Restart=on-success to make the WebUI Restart functionality work. However this makes the shutdown functionality to create a restart as well.

Would it be possible to have exit on restart end with a different exit code, in order to tell systemd to restart only for those, or an environment variable that disables the “shutdown” from the user interface?