Compare commits
No commits in common. "master" and "v1.0.1" have entirely different histories.
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
@ -1,12 +0,0 @@
|
|||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
github: taigrr # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
||||||
patreon: # Replace with a single Patreon username
|
|
||||||
open_collective: # Replace with a single Open Collective username
|
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
||||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
||||||
liberapay: # Replace with a single Liberapay username
|
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
|
||||||
otechie: # Replace with a single Otechie username
|
|
||||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
8
util.go
8
util.go
@ -4,7 +4,6 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
)
|
)
|
||||||
@ -16,9 +15,7 @@ const killed = 130
|
|||||||
func init() {
|
func init() {
|
||||||
path, err := exec.LookPath("systemctl")
|
path, err := exec.LookPath("systemctl")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("%v", ErrNotInstalled)
|
panic(ErrNotInstalled)
|
||||||
systemctl = ""
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
systemctl = path
|
systemctl = path
|
||||||
}
|
}
|
||||||
@ -33,9 +30,6 @@ func execute(ctx context.Context, args []string) (string, string, int, error) {
|
|||||||
warnings string
|
warnings string
|
||||||
)
|
)
|
||||||
|
|
||||||
if systemctl == "" {
|
|
||||||
panic(ErrNotInstalled)
|
|
||||||
}
|
|
||||||
cmd := exec.CommandContext(ctx, systemctl, args...)
|
cmd := exec.CommandContext(ctx, systemctl, args...)
|
||||||
cmd.Stdout = &stdout
|
cmd.Stdout = &stdout
|
||||||
cmd.Stderr = &stderr
|
cmd.Stderr = &stderr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user