op-packages/teleproxy/files/teleproxy.defaults
github-actions[bot] 80f09ddc21 🔥 Sync 2026-04-25 08:30:25
2026-04-25 08:30:25 +08:00

9 lines
338 B
Bash

#!/bin/sh
# generate secret key
if uci -q get teleproxy.default.secret >/dev/null || [ -z "$(uci get teleproxy.default.secret)" ]; then
#SECRET=$(dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -v -e '16/1 "%02x"')
SECRET=$(/usr/bin/teleproxy generate-secret)
uci set teleproxy.default.secret="$SECRET"
uci commit teleproxy
fi