mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-10-08 18:20:29 +08:00
config: add RPC command to reload config
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
@@ -227,3 +227,11 @@ func (s *DaemonServer) GetConfig(ctx context.Context, p *rpcproto.GetConfigParam
|
||||
Settings: settings,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *DaemonServer) ReloadConfig(ctx context.Context, params *proto.Empty) (*proto.Empty, error) {
|
||||
if err := s.Config.Reload(); err != nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "failed to reload configuration: %s", err)
|
||||
}
|
||||
|
||||
return &proto.Empty{}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user