#include "dinit-client.h"
#include "load-service.h"
#include "dinit-util.h"
+#include "mconfig.h"
// dinitctl: utility to control the Dinit daemon, including starting and stopping of services.
-// This utility communicates with the dinit daemon via a unix stream socket (/dev/initctl,
-// or $HOME/.dinitctl).
+// This utility communicates with the dinit daemon via a unix stream socket (as specified in
+// SYSCONTROLSOCKET, or $HOME/.dinitctl).
static constexpr uint16_t min_cp_version = 1;
static constexpr uint16_t max_cp_version = 1;
signal(SIGPIPE, SIG_IGN);
- control_socket_path = "/dev/dinitctl";
+ control_socket_path = SYSCONTROLSOCKET;
// Locate control socket
if (! sys_dinit) {
#include "service-constants.h"
#include "dinit-client.h"
#include "dinit-util.h"
+#include "mconfig.h"
#include "dasynq.h"
// shutdown: shut down the system
-// This utility communicates with the dinit daemon via a unix socket (/dev/initctl).
+// This utility communicates with the dinit daemon via a unix socket (specified in SYSCONTROLSOCKET).
static constexpr uint16_t min_cp_version = 1;
static constexpr uint16_t max_cp_version = 1;
return 1;
}
- const char *naddr = "/dev/dinitctl";
+ const char *naddr = SYSCONTROLSOCKET;
struct sockaddr_un name;
name.sun_family = AF_UNIX;