Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SetupCmd = &cobra.Command{ Use: "setup", Short: fmt.Sprintf("Setup and configure the %s.", name), RunE: func(cmd *cobra.Command, args []string) error { fmt.Printf("Starting %s setup...\n", name) var isOverwrite bool configExists := fileExists(configTarget) if configExists { fmt.Println("A configuration file already exists at:", configTarget) fmt.Println("When setting up non-interactively, the existing configuration file will be used.") if !term.IsTerminal(syscall.Stdin) { return nil } isOverwrite = cli.PromptForBool("Do you want to overwrite it with a new configuration?: ") if !isOverwrite { fmt.Println("Keeping the existing configuration file. Skipping configuration update.") return nil } } fmt.Println("Applying a new configuration automatically...") output, err := exec.Command("systemd-tmpfiles", "--create").CombinedOutput() if err != nil { return fmt.Errorf("%w\n%s", err, string(output)) } err = writeConfig() if err != nil { return err } fmt.Println("Configuration file successfully updated.") return nil }, }
Functions ¶
func SetConfigPaths ¶
func SetConfigPaths(serviceName string)
Types ¶
Click to show internal directories.
Click to hide internal directories.