problem: because the apps are not inserted into appdb, the cloudron starts out
with an empty view. apps appear suddenly after 30 seconds.
besides, it makes more sense because 30 secs is not really tied to first run
there is a race:
1. task is running
2. new task is created overwriting the installationState
3. new task kills the old task of step 1. this results in installationState getting overwritten by 'error' because of the sigkill
4. new task that is launched loses the installationState that was step in 2.
On Unix, child processes are not killed when parent dies.
Each process is part of a process group (pgid). When pgid == pid,
it is the process group leader.
node creates child processes with the parent as the group leader
(detached = false).
You can send a signal to entire group using kill(-pgid), as in,
negative value in argument. Systemd can be made to do this by
setting the KillMode=control-group.
Unrelated: Process groups reside inside session groups. Each session
group has a controlling terminal. Only one process in the session
group has access to the terminal. Process group is basically like
a bash pipeline. A session group is the entire login session with only
one process having terminal access at a time.
Fixes#543
Cloudron code paths like cron/mailer/taskmanager now wait for configuration
to be complete before doing anything.
This is useful when a cloudron is moved from a non-custom domain to a custom domain.
In that case, we require route53 configs.