/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "master-instance.h"
#include "master-service-settings.h"
#include "doveadm.h"
#include "doveadm-print.h"
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
extern struct doveadm_cmd doveadm_cmd_instance[];
{
int fd;
if (fd == -1) {
return FALSE;
}
if (ret < 0)
}
}
i_close_fd(&fd);
return found;
}
{
int c;
switch (c) {
case 'c':
show_config = TRUE;
break;
default:
help(&doveadm_cmd_instance[0]);
}
}
if (!show_config) {
doveadm_print_header_simple("name");
doveadm_print_header_simple("last used");
doveadm_print_header_simple("running");
}
continue;
if (show_config) {
inst->config_path);
continue;
}
if (pid_file_read(pidfile_path))
doveadm_print("yes");
else
doveadm_print("no");
}
}
{
int ret;
if (argc != 2)
i_error("Failed to remove instance");
} else if (ret == 0) {
i_error("Instance already didn't exist");
}
}
};
{
unsigned int i;
for (i = 0; i < N_ELEMENTS(doveadm_cmd_instance); i++) {
help(&doveadm_cmd_instance[i]);
}
i_unreached();
}
void doveadm_register_instance_commands(void)
{
unsigned int i;
for (i = 0; i < N_ELEMENTS(doveadm_cmd_instance); i++)
}