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
21 lines
517 B
Bash
Executable File
21 lines
517 B
Bash
Executable File
#!/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"
|