Closed rwxd closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
autorestic | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 10, 2023 7:26pm |
super cool, thanks :) In the docs you already showed how to check if autorestic is running, do we want to add that check into the code itself?
super cool, thanks :) In the docs you already showed how to check if autorestic is running, do we want to add that check into the code itself?
That is a good idea.
I modified the source code a bit so that the running processes will be checked. In case there is an autorestc process running, the user will get warned and has the option to abort or write yes
to still unlock the lock.
No process running
❯ go run main.go unlock
Using config: /home/user/.autorestic.yaml
Using lock: /home/user/.autorestic.lock.yml
Unlock successful
Process running, aborting with no
❯ go run main.go unlock
Using config: /home/user/.autorestic.yaml
Found autorestic processes:
root 61997 0.0 0.0 1236056 7472 pts/7 Sl+ 20:45 0:00 autorestic --ci backup -a
Another autorestic instance is running. Are you sure you want to unlock? (yes/no): no
Unlocking aborted.
Processing running, continue with yes
❯ go run main.go unlock
Using config: /home/user/.autorestic.yaml
Found autorestic processes:
root 61997 0.0 0.0 1236056 7472 pts/7 Sl+ 20:45 0:00 autorestic --ci backup -a
Another autorestic instance is running. Are you sure you want to unlock? (yes/no): yes
Using lock: /home/user/.autorestic.lock.yml
Unlock successful
@rwxd @cupcakearmy The unlock check now also detects the unlock process, e.g.:
❯ autorestic unlock
Using config: /root/.autorestic.yml
Found autorestic processes:
root 2834763 0.0 0.0 1232972 5632 pts/0 Sl+ 15:51 0:00 autorestic unlock
Another autorestic instance is running. Are you sure you want to unlock? (yes/no):
Hi, thanks for the awesome tool.
I had the case where the
.autorestic.lock.yml
had therunning
key totrue
but there was no instance running.This pull request adds the
unlock
command which just unlocks. Additionally a page to the documentation is added.Example:
I don't know if "fix:" is the right commit, I can rewrite the commit with "feat:" in case it fits better.