🍽 Fork YunoHost — snapshot mangé par la machine à tsoins
Upstream: https://github.com/YunoHost/yunohost @ 3a5f8bac8301c450897b96cbd43a4c7d3ba750fb But (José) : transformer tout le code en bions + ploxions du xerboxion. La carte de digestion vit au labo : /yunohost-digest.json
This commit is contained in:
20
share/yunohost-nftables-hooks
Executable file
20
share/yunohost-nftables-hooks
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
HOOK_FOLDER="/usr/share/yunohost/hooks/"
|
||||
CUSTOM_HOOK_FOLDER="/etc/yunohost/hooks.d/"
|
||||
|
||||
run_parts() {
|
||||
dir="$1"
|
||||
if [ -d "$dir" ]; then
|
||||
run-parts "$dir"
|
||||
fi
|
||||
}
|
||||
|
||||
pre_or_post="${1:-pre}"
|
||||
|
||||
run_parts "$HOOK_FOLDER/${pre_or_post}_nftables"
|
||||
run_parts "$CUSTOM_HOOK_FOLDER/${pre_or_post}_nftables"
|
||||
|
||||
# This one is legacy, apps should use the new ${pre_or_post}_nftables hook
|
||||
run_parts "$HOOK_FOLDER/${pre_or_post}_iptable_rules"
|
||||
run_parts "$CUSTOM_HOOK_FOLDER/${pre_or_post}_iptable_rules"
|
||||
Reference in New Issue
Block a user