-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement lock file; improve trap management #56
Conversation
friendly-bits
commented
Aug 2, 2024
•
edited
Loading
edited
- Implement lock file check, creation, removal
- Create the trap only for actions which need it
- stop(): kill any running adblock-lean PID's
- status(): check the lock file and if it exists then report on it and exit
- status(): support additional return codes
- Only load config for actions which need it
29af603
to
08e19cd
Compare
adblock-lean
Outdated
} | ||
|
||
if [ "${action}" != "help" ] && [ "${action}" != "gen_config" ] | ||
rm_lock() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind amending the functions to:
x()
{
…
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind amending the functions to
Done
Thanks for this. Looks pretty good from a very cursory read through whilst gardening. |
08e19cd
to
3b3a692
Compare
Changed function declarations to
|
3b3a692
to
70d6a0f
Compare
Updated with slightly more compact variable assignment in |
3de46d3
to
d2becaf
Compare
^ Yet more tinkering with code compaction in |
20858ff
to
d1afc49
Compare
^ Updated with more granular actions set in the lock file. |
d1afc49
to
87a0bd7
Compare
^ Fixed incorrect variable name in |
Should be able to test soon. Maybe @Wizballs might also be able to test too. |
c27fedb
to
76be692
Compare
^
|
Morning everyone, looks like there has been heaps going on! Sure thing I'll give everything a test run. |
@lynxthecat Tested multiple different times and service commands with the file lock. I can't find any failure conditions, so I think this PR is good. @friendly-bits That's really quite neat how it outputs what action is currently being performed. Also I saw another PR where stop/resume/pause was fixed. Tested these also since I was here, all working well again. |
76be692
to
320eb80
Compare
^
(sorry, I found the issue with stop and then I also wanted to change the return codes of status. should be good to go now) |
320eb80
to
bcf06d3
Compare
^ Change function name from |
bcf06d3
to
d71154a
Compare
^
|
Seems to work well. This evidently required some careful thought and coding. Terrific job @friendly-bits! |