secubox-openwrt/package/secubox/luci-app-ndpid/root/etc/init.d/ndpid-compat
CyberMind-FR e4a553a6d5 feat: Add nDPId package for lightweight DPI (alternative to netifyd)
- Add secubox-app-ndpid: nDPId daemon with bundled libndpi 5.x
- Add luci-app-ndpid: LuCI web interface for nDPId management
- Add migration documentation from netifyd to nDPId
- Uses git dev branch for latest libndpi API compatibility
- Builds nDPId + nDPIsrvd event broker for microservice architecture

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 09:32:23 +01:00

43 lines
858 B
Bash

#!/bin/sh /etc/rc.common
# nDPId Compatibility Layer init script
# Copyright (C) 2025 CyberMind.fr
START=52
STOP=9
USE_PROCD=1
PROG=/usr/bin/ndpid-compat
start_service() {
local enabled
config_load ndpid
config_get_bool enabled compat enabled 1
[ "$enabled" -eq 0 ] && {
logger -t ndpid-compat "Compatibility layer disabled"
return 0
}
# Wait for nDPIsrvd
sleep 2
procd_open_instance ndpid-compat
procd_set_param command "$PROG"
procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param pidfile /var/run/ndpid-compat.pid
procd_close_instance
logger -t ndpid-compat "Started compatibility layer"
}
stop_service() {
logger -t ndpid-compat "Stopping compatibility layer"
}
service_triggers() {
procd_add_reload_trigger "ndpid"
}