mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-12-15 16:54:58 +00:00
Compare commits
4 Commits
v1.8.0
...
454409b712
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
454409b712 | ||
| 6e34196220 | |||
|
|
dc56911a45 | ||
|
|
d332f4476b |
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Then paste this at the bottom of the file and save it. Note that in this specifi
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# This is required, as it otherwise cannot find restic as a command.
|
# This is required, as it otherwise cannot find restic as a command.
|
||||||
PATH="/usr/local/bin:/usr/bin:/bin"
|
PATH="/usr/local/bin:$PATH"
|
||||||
|
|
||||||
# Example running every 5 minutes
|
# Example running every 5 minutes
|
||||||
*/5 * * * * autorestic -c /path/to/my/.autorestic.yml --ci cron
|
*/5 * * * * autorestic -c /path/to/my/.autorestic.yml --ci cron
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user