mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
This commit adds reload command to ctrld for re-fetch new config from ContorlD API or re-read the current config on disk.
18 lines
259 B
Go
18 lines
259 B
Go
//go:build !windows
|
|
|
|
package cli
|
|
|
|
import (
|
|
"os"
|
|
"os/signal"
|
|
"syscall"
|
|
)
|
|
|
|
func notifyReloadSigCh(ch chan os.Signal) {
|
|
signal.Notify(ch, syscall.SIGUSR1)
|
|
}
|
|
|
|
func (p *prog) sendReloadSignal() error {
|
|
return syscall.Kill(syscall.Getpid(), syscall.SIGUSR1)
|
|
}
|