#!/bin/sh /etc/rc.common
# SecuBox Authentication Logger
# Monitors SSH and LuCI auth failures for CrowdSec
# Copyright (C) 2024 CyberMind.fr

START=99
STOP=10
USE_PROCD=1

PROG=/usr/lib/secubox/auth-monitor.sh

start_service() {
    procd_open_instance
    procd_set_param command "$PROG" start
    procd_set_param respawn
    procd_set_param stdout 0
    procd_set_param stderr 1
    procd_close_instance
}

service_triggers() {
    procd_add_reload_trigger "secubox-auth-logger"
}
