docs(README): update installation instructions for various distributions

This commit is contained in:
2026-04-08 19:48:07 +02:00
parent c6198ea6b7
commit b44546dc24
14 changed files with 131 additions and 66 deletions

View File

@@ -31,7 +31,7 @@ func runInstall(cmd *cobra.Command, args []string) error {
return err
}
prefix, suffix, serviceUser := cfg.Prefix, cfg.Suffix, cfg.EffectiveServiceUser()
prefix, suffix := cfg.Prefix, cfg.Suffix
installed := 0
skipped := 0
removed := 0
@@ -57,7 +57,7 @@ func runInstall(cmd *cobra.Command, args []string) error {
}
if dryRun {
content, err := systemd.Generate(u, prefix, suffix, serviceUser)
content, err := systemd.Generate(u, prefix, suffix)
if err != nil {
fmt.Printf(" ✗ %s: %v\n", u.Name, err)
continue
@@ -68,7 +68,7 @@ func runInstall(cmd *cobra.Command, args []string) error {
continue
}
if err := systemd.Install(u, prefix, suffix, serviceUser); err != nil {
if err := systemd.Install(u, prefix, suffix); err != nil {
fmt.Printf(" ✗ failed: %s: %v\n", u.Name, err)
} else {
path, _ := systemd.UnitPath(u, prefix, suffix)

View File

@@ -7,6 +7,8 @@ import (
"github.com/spf13/cobra"
)
var version = "dev"
var configPath string
var rootCmd = &cobra.Command{
@@ -16,7 +18,7 @@ var rootCmd = &cobra.Command{
It discovers running containers, stores them in a config file,
and generates + manages systemd .service units for each one.`,
Version: "0.1.0",
Version: version,
}
func Execute() {

View File

@@ -63,10 +63,10 @@ func runUpdate(cmd *cobra.Command, args []string) error {
return err
}
prefix, suffix, serviceUser := cfg.Prefix, cfg.Suffix, cfg.EffectiveServiceUser()
prefix, suffix := cfg.Prefix, cfg.Suffix
if systemd.IsInstalled(*u, prefix, suffix) {
if err := systemd.Install(*u, prefix, suffix, serviceUser); err != nil {
if err := systemd.Install(*u, prefix, suffix); err != nil {
return fmt.Errorf("recreating service file: %w", err)
}
path, _ := systemd.UnitPath(*u, prefix, suffix)