()
| 43 | } |
| 44 | |
| 45 | func (this *SystemServiceManager) Setup() error { |
| 46 | if sharedNodeConfig == nil || !sharedNodeConfig.IsOn { |
| 47 | return nil |
| 48 | } |
| 49 | |
| 50 | if len(sharedNodeConfig.SystemServices) == 0 { |
| 51 | return nil |
| 52 | } |
| 53 | |
| 54 | systemdParams, ok := sharedNodeConfig.SystemServices[nodeconfigs.SystemServiceTypeSystemd] |
| 55 | if ok { |
| 56 | err := this.setupSystemd(systemdParams) |
| 57 | if err != nil { |
| 58 | return err |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | return nil |
| 63 | } |
| 64 | |
| 65 | func (this *SystemServiceManager) setupSystemd(params maps.Map) error { |
| 66 | // 只有在Linux下运行 |