mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
implement uncloudd daemon that starts a WireGuard network without peer probing
This commit is contained in:
@@ -144,10 +144,17 @@ func (c *Cluster) AddMachine(ctx context.Context, name, user, host string, port
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("write machine config to %q: %w", mcfgPath, err)
|
||||
}
|
||||
fmt.Println("Machine config written to", mcfgPath)
|
||||
|
||||
// TODO: download and install the latest uncloudd binary by running the install shell script from GitHub.
|
||||
// For now upload the binary using scp manually.
|
||||
|
||||
out, err := exec.Run(ctx, cmdexec.QuoteCommand(sudoPrefix, "systemctl", "restart", "uncloudd"))
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("start uncloudd: %w: %s", err, out)
|
||||
}
|
||||
fmt.Println("uncloudd started")
|
||||
|
||||
connConfig := config.MachineConnection{
|
||||
User: user,
|
||||
Host: host,
|
||||
|
||||
Reference in New Issue
Block a user