Ensure app services like redis to be also started on restart if previously stopped

This commit is contained in:
Johannes Zellner
2022-08-23 11:33:07 +02:00
parent d1bdb80c72
commit 84ca85b315
+10
View File
@@ -726,10 +726,20 @@ async function restart(app, args, progressCallback) {
assert.strictEqual(typeof progressCallback, 'function');
if (app.manifest.id !== constants.PROXY_APP_APPSTORE_ID) {
await progressCallback({ percent: 10, message: 'Starting app services' });
await services.startAppServices(app);
await progressCallback({ percent: 20, message: 'Restarting container' });
await docker.restartContainer(app.id);
}
await progressCallback({ percent: 60, message: 'Adding collectd profile' });
await addCollectdProfile(app);
// stopped apps do not renew certs. currently, we don't do DNS to not overwrite existing user settings
await progressCallback({ percent: 80, message: 'Configuring reverse proxy' });
await reverseProxy.configureApp(app, AuditSource.APPTASK);
await progressCallback({ percent: 100, message: 'Done' });
await updateApp(app, { installationState: apps.ISTATE_INSTALLED, error: null, health: null });
}