-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94b6f1d
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.
Jamie, as you mentioned here, I also changed the yesterday's commit. It didn't work yesterday when I was trying it by just using:
.. so I ended up using
&apply_nginx();
, which worked just fine. I'm surprised you didn't mention it at the first place?So, now I ran more tests and using:
.. works just fine. So, why using
set_all_null_print
is necessary in this case?94b6f1d
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.
If you don't want the apply command to print anything (like "restarting Nginx"), use &apply_nginx instead of &print_apply_nginx. Then you don't need these lines :
94b6f1d
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.
But then the restart will happen multiple times. What if 20 protected directories deleted at once?
We don't want that, right?
94b6f1d
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.
Exactly why to use register_post_action, because it guarantees that each action is only run once at the end of the script.