+}
+
+/** @brief Create and destroy sockets to set current configuration */
+void reset_sockets(ev_source *ev) {
+ struct addrinfo *res, *r;
+ struct listener *l, **ll;
+ const char *private_dir = config_get_file("private");
+
+ /* create the private socket directory */
+ unlink(private_dir);
+ if(mkdir(private_dir, 0700) < 0 && errno != EEXIST)
+ disorder_fatal(errno, "error creating %s", private_dir);
+
+ /* unix first */
+ reset_unix_socket(ev, main_socket, config_get_file("socket"), 0);
+ reset_unix_socket(ev, priv_socket, config_get_file("private/socket"), 1);