- Add repo-deploy.sh script for staging and deploying packages - Replicate _all.ipk packages to all 6 architectures automatically - Add "Refresh Indexes" button to LuCI dashboard for local deployments - Add RPCD refresh method to regenerate Packages indexes on-device - Support architectures: aarch64_cortex-a72, aarch64_cortex-a53, aarch64_generic, x86_64, mips_24kc, mipsel_24kc Usage: ./secubox-tools/repo-deploy.sh stage --clean ./secubox-tools/repo-deploy.sh deploy root@192.168.255.1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
62 lines
1.4 KiB
Bash
Executable File
62 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
. /usr/share/libubox/jshn.sh
|
|
|
|
case "$1" in
|
|
list)
|
|
echo '{"status":{},"peers":{},"tree":{},"token_generate":{},"approve":{"fingerprint":"str","action":"str","reason":"str"},"token_cleanup":{}}'
|
|
;;
|
|
call)
|
|
case "$2" in
|
|
status)
|
|
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
|
|
ml_status | tr -d '\n\t'
|
|
;;
|
|
peers)
|
|
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
|
|
ml_peer_list | tr -d '\n\t'
|
|
;;
|
|
tree)
|
|
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
|
|
ml_tree | tr -d '\n\t'
|
|
;;
|
|
token_generate)
|
|
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
|
|
ml_token_generate | tr -d '\n\t'
|
|
;;
|
|
approve)
|
|
read -r input
|
|
fingerprint=$(echo "$input" | jsonfilter -e '@.fingerprint' 2>/dev/null)
|
|
action=$(echo "$input" | jsonfilter -e '@.action' 2>/dev/null)
|
|
reason=$(echo "$input" | jsonfilter -e '@.reason' 2>/dev/null)
|
|
|
|
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
|
|
|
|
case "$action" in
|
|
approve)
|
|
ml_join_approve "$fingerprint" | tr -d '\n\t'
|
|
;;
|
|
reject)
|
|
ml_join_reject "$fingerprint" "$reason" | tr -d '\n\t'
|
|
;;
|
|
promote)
|
|
ml_promote_to_submaster "$fingerprint" | tr -d '\n\t'
|
|
;;
|
|
*)
|
|
echo '{"error":"invalid_action"}'
|
|
;;
|
|
esac
|
|
;;
|
|
token_cleanup)
|
|
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
|
|
ml_token_cleanup | tr -d '\n\t'
|
|
;;
|
|
*)
|
|
echo '{"error":"unknown_method"}'
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
|
|
exit 0
|