Compare commits

...

4 Commits

Author SHA1 Message Date
ಠ_ಠ
37c8e11397 Merge 0a48d13d6c into 6e34196220 2024-03-13 14:42:41 +01:00
6e34196220 Update config.go 2024-03-13 12:40:11 +01:00
Florian
dc56911a45 fix(unlock cmd): ignore process if its the current id (#360) 2024-03-13 12:39:51 +01:00
ಠ_ಠ
0a48d13d6c Fix quick installation instruction
The command in the documentation was wrong and didn't run the script with elevated privileges. This one does.
2023-12-28 12:11:47 +01:00
3 changed files with 5 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ package cmd
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"os"
"os/exec" "os/exec"
"strings" "strings"
@@ -61,9 +62,10 @@ func isAutoresticRunning() bool {
lines := strings.Split(out.String(), "\n") lines := strings.Split(out.String(), "\n")
autoresticProcesses := []string{} autoresticProcesses := []string{}
currentPid := fmt.Sprint(os.Getpid())
for _, line := range lines { 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) autoresticProcesses = append(autoresticProcesses, line)
} }
} }

View File

@@ -5,7 +5,7 @@ Linux & macOS. Windows is not supported. If you have problems installing please
Autorestic requires `bash`, `wget` and `bzip2` to be installed. For most systems these should be already installed. Autorestic requires `bash`, `wget` and `bzip2` to be installed. For most systems these should be already installed.
```bash ```bash
wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash sudo bash -c "$(wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh)"
``` ```
## Alternatives ## Alternatives

View File

@@ -17,7 +17,7 @@ import (
"github.com/spf13/viper" "github.com/spf13/viper"
) )
const VERSION = "1.8.0" const VERSION = "1.8.1"
type OptionMap map[string][]interface{} type OptionMap map[string][]interface{}
type Options map[string]OptionMap type Options map[string]OptionMap