We really need better error messaging. Whenever there is an issue like Error: apache2 restart failed I have to go scrambling to find the issue root, plowing through logs and xtracing the script.
If not all relevant commands were silenced, this could often be sped up a lot. For example my recent xtrace led me to the failing command, which gave a clear error:
> sudo apache2ctl configtest
AH00526: Syntax error on line 30 of /etc/apache2/conf.d/domains/DOMAIN.ssl.conf:
SSLCertificateFile: file '/home/reitershan/conf/web/DOMAIN/ssl/DOMAIN.crt' does not exist or is empty
Why do you redirect all output away, rather than letting the relevant commands print their output?
nginx restart failed is really driving us crazy!
It is such a nondescript error with so many moving parts, and half of all webpanel operations straightup fail with it even though it should not be an essential component of any!
And manually executing v-restart-proxy works just fine…