|
root / stub / src / zygctl.reef
zygctl.reef Reef 28 lines 943 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// zygctl.reef — Administrative CLI for zyginit
//
// Communicates with the running zyginit daemon over Unix domain socket
// at /var/run/zyginit.sock.
//
// Usage:
//   zygctl status              # list all services
//   zygctl status <name>       # status of one service
//   zygctl start <name>        # start a service (transient)
//   zygctl stop <name>         # stop a service
//   zygctl restart <name>      # restart a service
//   zygctl enable <name>       # enable at boot (creates symlink)
//   zygctl disable <name>      # disable at boot (removes symlink)
//   zygctl list                # list all service definitions

const SOCKET_PATH: &str = "/var/run/zyginit.sock";

fn main() -> i32 {
    // TODO: implement
    // 1. Parse command-line arguments
    // 2. Connect to Unix domain socket
    // 3. Send command
    // 4. Read and display response
    // 5. For enable/disable: also manage symlinks in enabled.d/

    0
}