the automatic service restart should not happen during sysupgrade
[project/procd.git] / instance.c
index 4230d0d..05b0f99 100644 (file)
@@ -149,6 +149,9 @@ instance_exit(struct uloop_process *p, int ret)
        runtime = tp.tv_sec - in->start.tv_sec;
 
        DEBUG(1, "Instance %s::%s exit with error code %d after %ld seconds\n", in->srv->name, in->name, ret, runtime);
+       if (upgrade_running)
+               return;
+
        uloop_timeout_cancel(&in->timeout);
        if (in->halt) {
                /* no action */
@@ -334,8 +337,8 @@ instance_config_parse(struct service_instance *in)
                }
                in->respawn = true;
                in->respawn_count = 0;
-               in->respawn_timeout = vals[0];
-               in->respawn_threshold = vals[1];
+               in->respawn_threshold = vals[0];
+               in->respawn_timeout = vals[1];
                in->respawn_retry = vals[2];
        }
        if (tb[INSTANCE_ATTR_TRIGGER]) {