mirror of
https://github.com/opnsense/plugins.git
synced 2026-02-03 20:40:37 -05:00
syssutils/apuled: drop obsolete plugin
This commit is contained in:
parent
276b8ecdc5
commit
9810e4b1d7
11 changed files with 0 additions and 223 deletions
1
LICENSE
1
LICENSE
|
|
@ -13,7 +13,6 @@ Copyright (c) 2023 Bernhard Frenking <bernhard@frenking.eu>
|
|||
Copyright (c) 2023 Cannon Matthews <cannonmatthews@google.com>
|
||||
Copyright (c) 2023-2025 Cedrik Pischem
|
||||
Copyright (c) 2025 Christopher Linn, BackendMedia IT-Services GmbH
|
||||
Copyright (c) 2019 Cloudfence - Julio Camargo (JCC)
|
||||
Copyright (c) 2005-2006 Colin Smith <ethethlay@gmail.com>
|
||||
Copyright (c) 2021 Dan Lundqvist
|
||||
Copyright (c) 2021 David Berry
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ security/tinc -- Tinc VPN
|
|||
security/tor -- The Onion Router
|
||||
security/wazuh-agent -- Agent for the open source security platform Wazuh
|
||||
sysutils/apcupsd -- APCUPSD - APC UPS daemon
|
||||
sysutils/apuled -- PC Engine APU LED control (development only)
|
||||
sysutils/beats -- Send logs, network, metrics and heartbeat to Elasticsearch
|
||||
sysutils/cpu-microcode -- CPU microcode updates
|
||||
sysutils/dec-hw -- Deciso hardware specific information
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
LED1="/dev/led/led1"
|
||||
LED2="/dev/led/led2"
|
||||
LED3="/dev/led/led3"
|
||||
LEDKO="/boot/kernel/apuled.ko"
|
||||
|
||||
if [ ! -e /boot/kernel/apuled.ko ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
kldload $LEDKO 2>&1
|
||||
|
||||
echo "m-" > $LED1
|
||||
echo "m -" > $LED2
|
||||
echo "m -" > $LED3
|
||||
sleep 2
|
||||
echo 1 > $LED1
|
||||
echo 1 > $LED2
|
||||
echo 1 > $LED3
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2019 Cloudfence - Julio Camargo (JCC)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
PLUGIN_NAME= apuled
|
||||
PLUGIN_VERSION= 0.2
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_DEVEL= yes
|
||||
PLUGIN_COMMENT= PC Engine APU LED control
|
||||
PLUGIN_MAINTAINER= julio@cloudfence.com.br
|
||||
|
||||
.include "../../Mk/plugins.mk"
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
### APU LED Plugin ###
|
||||
|
||||
#### LED control for PC Engines APU platform OPNsense plugin ####
|
||||
|
||||
**Left -> Right**
|
||||
LED1|LED2|LED3
|
||||
|
||||
At system boot, the 3 LEDs will blink (leds test).
|
||||
|
||||
| | LED1 | LED2 | LED3 |
|
||||
|---------------------------------------|----------|---------------------------|------|
|
||||
| System booting... | Blinking | OFF | OFF |
|
||||
| System OK | ON | ON | ON |
|
||||
| CPU Load > 90% | Blinking | - | - |
|
||||
| Disk freespace < 10% | - | Blinking (SOS morse code) | - |
|
||||
| WAN offline (without Internet access) | - | Blinking fast | - |
|
||||
| WAN packetloss > 30% | - | Blinking slow | - |
|
||||
| WAN online (Internet access) | - | ON | - |
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
LED control for PC Engines APU platform OPNsense plugin
|
||||
Cloudfence 2019 - JCC
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -x
|
||||
# APU LED plugin - Cloudfence 2019 JCC
|
||||
|
||||
|
||||
# LEDs
|
||||
LED1="/dev/led/led1"
|
||||
LED2="/dev/led/led2"
|
||||
LED3="/dev/led/led3"
|
||||
LEDKO="/boot/kernel/apuled.ko"
|
||||
|
||||
|
||||
messages()
|
||||
{
|
||||
MSG=$1
|
||||
echo "$MSG"
|
||||
logger -t "APU Plugin" "$MSG"
|
||||
}
|
||||
|
||||
# check if the module file exists
|
||||
if [ -e /boot/kernel/apuled.ko ];then
|
||||
# Load module
|
||||
kldload $LEDKO 2>&1
|
||||
else
|
||||
messages "Error: APU LED module is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# starting boot LED message
|
||||
# make the initial test
|
||||
echo "m-" > $LED1
|
||||
echo "m -" > $LED2
|
||||
echo "m -" > $LED3
|
||||
sleep 2
|
||||
echo 1 > $LED1
|
||||
echo 1 > $LED2
|
||||
echo 1 > $LED3
|
||||
sleep 2
|
||||
# PWR bliking to show booting state
|
||||
echo "f6" > $LED1
|
||||
echo 0 > $LED2
|
||||
echo 0 > $LED3
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# LEDs
|
||||
LED1="/dev/led/led1"
|
||||
LED2="/dev/led/led2"
|
||||
LED3="/dev/led/led3"
|
||||
|
||||
#stop blinking PWR LED
|
||||
echo 1 > $LED1
|
||||
echo 1 > $LED2
|
||||
echo 1 > $LED3
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2019 Cloudfence - Julio Camargo (JCC)
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# LEDs
|
||||
LED1="/dev/led/led1"
|
||||
LED2="/dev/led/led2"
|
||||
LED3="/dev/led/led3"
|
||||
|
||||
# check if LEDs exists
|
||||
if [ ! -e "$LED1" ];then
|
||||
logger -t "APULED Plugin" "Error: LED device not exists"
|
||||
fi
|
||||
|
||||
check_wan(){
|
||||
# LED2 - network notifications
|
||||
# Fetch from dpinger the list of gateways and the status of each one
|
||||
GWLIST=$(ls /var/run/dpinger* | grep sock)
|
||||
|
||||
for GW in $GWLIST; do
|
||||
GWSTATUS=$(nc -U $GW | awk '{print $4}')
|
||||
# We're ONLINE
|
||||
if [ "$GWSTATUS" -eq 0 ];then
|
||||
echo "1" > $LED2
|
||||
# Some losses - LATENCY
|
||||
elif [ "$GWSTATUS" -gt 30 ] && [ "$GWSTATUS" -lt 100 ];then
|
||||
LATENCY=1
|
||||
# One of our Gateways is DOWN - ALARM
|
||||
# Test if the GWs are OK. If just one of the GWs failed the test, the LED will show DOWN status
|
||||
elif [ "$GWSTATUS" -eq 100 ];then
|
||||
echo "f1" > $LED2
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
# In case of packets loss, I'll warn!
|
||||
if [ ! -z "$LATENCY" ];then
|
||||
echo "f3" > $LED2
|
||||
fi
|
||||
}
|
||||
|
||||
check_load(){
|
||||
# check CPU idle
|
||||
# LED1 - system notifications
|
||||
CHK_IDLE=$(vmstat 1 2 | tail -1 | awk '{ print $19 }')
|
||||
|
||||
if [ "$CHK_IDLE" -lt "10" ];then
|
||||
echo "f4" > $LED1
|
||||
else
|
||||
echo "1" > $LED1
|
||||
fi
|
||||
}
|
||||
|
||||
check_disk(){
|
||||
# check Disk space
|
||||
# LED3 - system notifications
|
||||
DSK_FREE=$(df -kh / | tail -1 | awk '{ print 100-$5 }')
|
||||
|
||||
if [ "$DSK_FREE" -lt "10" ];then
|
||||
echo "m...---..." > $LED3
|
||||
else
|
||||
echo "1" > $LED3
|
||||
fi
|
||||
}
|
||||
|
||||
# Main routine
|
||||
check_load
|
||||
check_disk
|
||||
check_wan
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[run]
|
||||
command:/usr/local/opnsense/scripts/apuled/apuledctl
|
||||
parameters:
|
||||
type:script
|
||||
message:APU LEDs control
|
||||
description:APULED LED status
|
||||
Loading…
Reference in a new issue