Towards proper error propagation

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…

We have 2 options:

  1. Leak all the websites that are running on the website to the user if restarts fails he probally can’t do anything


  1. send a log to the admin user

The last one works fine here for the last year make sure email can be send probally or configure an smtp relay

  1. more elaborate output in the CLI but not making all of it visible in the frontend, for example by displaying only one of stdout or stderr
  2. somehow automagically switch to tee when using debug mode so everything is visible