func (r *Nutctl) RestartAll(args []string, ret *string) (err error) {
	defer func() {
		if r := recover(); r != nil {
			err = r.(error)
		}
	}()
	for _, proc := range Procs {
		if err = restartProc(proc.Name); err != nil {
			break
		}
	}
	return err
}
RestartAll do restart all
package internal
import (
	"context"
	"errors"
	"fmt"
	"net"
	"net/rpc"
	"sync"
	"time"
)
type Nutctl struct {
	rpcChan chan<- *RpcMessage
}
type RpcMessage struct {
	Msg  string
	Args []string
	ErrCh chan error
}
func (r *Nutctl) Start(args []string, ret *string) (err error) {
	defer func() {
		if r := recover(); r != nil {
			err = r.(error)
		}
	}()
	for _, arg := range args {
		if err = startProc(arg, nil, nil); err != nil {
			break
		}
	}
	return err
}
func (r *Nutctl) Stop(args []string, ret *string) (err error) {
	defer func() {
		if r := recover(); r != nil {
			err = r.(error)
		}
	}()
	errChan := make(chan error, 1)
	r.rpcChan <- &RpcMessage{
		Msg:   "stop",
		Args:  args,
		ErrCh: errChan,
	}
	err = <-errChan
	return
}
func (r *Nutctl) StopAll(args []string, ret *string) (err error) {
	defer func() {
		if r := recover(); r != nil {
			err = r.(error)
		}
	}()
	for _, proc := range Procs {
		if err = stopProc(proc.Name, nil); err != nil {
			break
		}
	}
	return err
}
func (r *Nutctl) Restart(args []string, ret *string) (err error) {
	defer func() {
		if r := recover(); r != nil {
			err = r.(error)
		}
	}()
	for _, arg := range args {
		if err = restartProc(arg); err != nil {
			break
		}
	}
	return err
}