Files
yunohost/share/yunohost-nftables-hooks
machine-a-tsoins edb4c397df
Some checks failed
Check for new n releases / updater (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
🍽 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
2026-07-03 17:20:06 +00:00

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"