mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
mwan3-luci: update to 1.3-2
added support for new last_resort option for policy configuration added dependencies for luci-mod-admin-full and luci-lib-nixio shortened length of menuconfig description lines reworded things on various pages changed date formatting in custom hotplug script default route checks now verify both destination/netmask are 0.0.0.0 condensed messy javascript lines and removed -F' ' from awk commands Signed-off-by: Aedan Renner <chipdankly@gmail.com>
This commit is contained in:
Regular → Executable
+5
-6
@@ -1,22 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# to enable this script uncomment the case loop at the bottom
|
||||
# to report MWAN3 status on interface up/down events modify the lines in the send_reportdata function
|
||||
# to report mwan3 status on interface hotplug ifup/ifdown events modify the lines in the send_alert function
|
||||
|
||||
send_alert()
|
||||
{
|
||||
# $1 stores the mwan3 status information
|
||||
# insert your code here to send the contents of $1
|
||||
echo "$1"
|
||||
# variable "$1" stores the mwan3 status information
|
||||
# insert your code here to send the contents of "$1"
|
||||
}
|
||||
|
||||
gather_event_info()
|
||||
{
|
||||
# create event information message
|
||||
local EVENT_INFO="Interface [ "$INTERFACE" ($DEVICE) ] on router [ "$(uci get -p /var/state system.@system[0].hostname)" ] has triggered an [ "$ACTION" ] hotplug event on "$(date)""
|
||||
local EVENT_INFO="Interface [ "$INTERFACE" ($DEVICE) ] on router [ "$(uci get -p /var/state system.@system[0].hostname)" ] has triggered a hotplug [ "$ACTION" ] event on "$(date +"%a %b %d %Y %T %Z")""
|
||||
|
||||
# get current interface, policy and rule status
|
||||
local CURRENT_STATUS="$(mwan3 status)"
|
||||
local CURRENT_STATUS="$(/usr/sbin/mwan3 status)"
|
||||
|
||||
# get last 50 mwan3 systemlog messages
|
||||
local MWAN3_LOG="$(echo -e "Last 50 MWAN3 systemlog entries. Newest entries sorted at the top:\n$(logread | grep mwan3 | tail -n 50 | sed 'x;1!H;$!d;x')")"
|
||||
|
||||
Reference in New Issue
Block a user