+/* timer callback */
+static void timer_cb(evutil_socket_t fd, short what, void *arg)
+{
+ static int i = 0;
+
+ if (in_shutdown)
+ return;
+
+ if (afpd_pid == -1) {
+ afpd_restarts++;
+ LOG(log_note, logtype_afpd, "Restarting 'afpd' (restarts: %u)", afpd_restarts);
+ if ((afpd_pid = run_process(_PATH_AFPD, "-d", "-F", obj.options.configfile, NULL)) == -1) {
+ LOG(log_error, logtype_afpd, "Error starting 'afpd'");
+ }
+ }
+
+ if (cnid_metad_pid == -1) {
+ cnid_metad_restarts++;
+ LOG(log_note, logtype_afpd, "Restarting 'cnid_metad' (restarts: %u)", cnid_metad_restarts);
+ if ((cnid_metad_pid = run_process(_PATH_CNID_METAD, "-d", "-F", obj.options.configfile, NULL)) == -1) {
+ LOG(log_error, logtype_afpd, "Error starting 'cnid_metad'");
+ }
+ }
+}
+