mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-23 00:36:25 +00:00
Compare commits
2 Commits
edb3ba35d8
...
6e34196220
Author | SHA1 | Date | |
---|---|---|---|
6e34196220 | |||
|
dc56911a45 |
@ -3,6 +3,7 @@ package cmd
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
@ -61,9 +62,10 @@ func isAutoresticRunning() bool {
|
||||
|
||||
lines := strings.Split(out.String(), "\n")
|
||||
autoresticProcesses := []string{}
|
||||
currentPid := fmt.Sprint(os.Getpid())
|
||||
|
||||
for _, line := range lines {
|
||||
if strings.Contains(line, "autorestic") && !strings.Contains(line, "grep autorestic") {
|
||||
if strings.Contains(line, "autorestic") && !strings.Contains(line, "grep autorestic") && !strings.Contains(line, currentPid) {
|
||||
autoresticProcesses = append(autoresticProcesses, line)
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const VERSION = "1.8.0"
|
||||
const VERSION = "1.8.1"
|
||||
|
||||
type OptionMap map[string][]interface{}
|
||||
type Options map[string]OptionMap
|
||||
|
Loading…
Reference in New Issue
Block a user