Add service restart

This commit is contained in:
problematicconsumer
2023-09-10 20:18:33 +03:30
parent 610747f9ad
commit c887815676
4 changed files with 113 additions and 30 deletions

View File

@@ -7,7 +7,16 @@ var commandServer *libbox.CommandServer
type CommandServerHandler struct{}
func (csh *CommandServerHandler) ServiceReload() error {
return nil
propagateStatus(Starting)
if commandServer != nil {
commandServer.SetService(nil)
commandServer = nil
}
if box != nil {
box.Close()
box = nil
}
return startService()
}
func (csh *CommandServerHandler) GetSystemProxyStatus() *libbox.SystemProxyStatus {