Each app now carries everything under containers/<app>/: Tools-tab actions in tools/ (declaration <app>.tools.json + function <app>_<tool_id>.sh) and logic helpers in scripts/ (e.g. <app>_auth.sh). The container scan live-sources every .sh under the app (maxdepth 3, prunes only resources/) and webui_tools.sh auto-merges the .tools.json, so an app is a true drop-in — no central edit, no array regen. - Empty the central webui_tools.sh heredoc; all 34 tools across 11 apps now come from per-app declarations (verified byte-identical to the old output). - Retire the orphaned mattermost tool scripts to scripts/unused (there is no containers/mattermost; its install fn already lived in unused). - Update the dispatch comment/error path, the auth-adapter doc, and DEVELOPMENT.md to the new convention. - Regenerate static arrays (files_app.sh no longer lists app/containers/*). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
41 lines
1.3 KiB
Bash
41 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
appCrowdSecUpdate() {
|
|
isHeader "Update CrowdSec"
|
|
|
|
((menu_number++))
|
|
echo ""
|
|
echo "---- $menu_number. Updating apt package index."
|
|
echo ""
|
|
local result=$(runSystem apt-get update)
|
|
checkSuccess "apt-get update"
|
|
|
|
((menu_number++))
|
|
echo ""
|
|
echo "---- $menu_number. Upgrading CrowdSec packages."
|
|
echo ""
|
|
local result=$(runSystem apt-get install -y --only-upgrade crowdsec crowdsec-firewall-bouncer-nftables)
|
|
checkSuccess "Upgraded crowdsec + crowdsec-firewall-bouncer-nftables"
|
|
|
|
((menu_number++))
|
|
echo ""
|
|
echo "---- $menu_number. Refreshing hub collections."
|
|
echo ""
|
|
local result=$(runSystem cscli hub update)
|
|
checkSuccess "Refreshed hub index"
|
|
local result=$(runSystem cscli hub upgrade)
|
|
checkSuccess "Upgraded installed collections"
|
|
|
|
((menu_number++))
|
|
echo ""
|
|
echo "---- $menu_number. Reloading services."
|
|
echo ""
|
|
local result=$(runSystem systemctl reload crowdsec)
|
|
checkSuccess "Reloaded crowdsec agent"
|
|
local result=$(runSystem systemctl restart crowdsec-firewall-bouncer)
|
|
checkSuccess "Restarted crowdsec-firewall-bouncer"
|
|
|
|
isSuccessful "CrowdSec updated. Run 'crowdsec_verify_firewall' if you want to re-check nftables priorities."
|
|
menu_number=0
|
|
}
|