Conversation
Greptile SummaryAdded systemd service management for the KMIP server, enabling automated installation and uninstallation via Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: 55f674d |
| } | ||
|
|
||
| log.Info().Msg("Successfully installed systemd service") | ||
| log.Info().Msg("To start the service, run: sudo systemctl start infisical-kmip") |
There was a problem hiding this comment.
Hmm curious, I see in a previous function we're running enableCmd := exec.Command("systemctl", "enable", "infisical-kmip") but on this one we are relying on the user to run it manually, any reason why this one is different?
| } | ||
|
|
||
| configPath := filepath.Join(configDir, "kmip.conf") | ||
| if err := os.WriteFile(configPath, []byte(configContent), 0600); err != nil { |
There was a problem hiding this comment.
Should we quote the env variable? If configPath contains spaces then it would break right?
| } | ||
|
|
||
| if os.Geteuid() != 0 { | ||
| util.HandleError(fmt.Errorf("systemd service installation requires root/sudo privileges")) |
There was a problem hiding this comment.
shouldn't this be "systemd service uninstallation requires root/sudo privileges"
Description 📣
This PR adds native support for KMIP systemd install
Related PR:
Infisical/infisical#5566
Type ✨
Tests 🛠️
# Here's some code block to paste some code snippets