travelmate: update 2.1.2-4
* more re-connections tweaks * made travelmate generated emails responsive Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
parent
bd84d97be6
commit
bd8829b341
|
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=travelmate
|
||||
PKG_VERSION:=2.1.2
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/bin/sh
|
||||
# send mail script for travelmate notifications
|
||||
# Copyright (c) 2020-2022 Dirk Brenken (dev@brenken.org)
|
||||
# Copyright (c) 2020-2024 Dirk Brenken (dev@brenken.org)
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
|
||||
# set (s)hellcheck exceptions
|
||||
# shellcheck disable=1091,3040
|
||||
# shellcheck disable=all
|
||||
|
||||
# Please note: you have to setup the package 'msmtp' before using this script
|
||||
|
||||
|
@ -43,7 +43,7 @@ trm_mailhead="From: ${trm_mailsender}\nTo: ${trm_mailreceiver}\nSubject: ${trm_m
|
|||
|
||||
# mail body
|
||||
#
|
||||
trm_mailtext="<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>"
|
||||
trm_mailtext="<html><body><pre style='font-family:monospace;padding:20;background-color:#f3eee5;white-space:pre-wrap;overflow-x:auto;' >"
|
||||
trm_mailtext="${trm_mailtext}\n<strong>++\n++ System Information ++\n++</strong>\n${sys_info}"
|
||||
trm_mailtext="${trm_mailtext}\n\n<strong>++\n++ Travelmate Information ++\n++</strong>\n${trm_info}"
|
||||
trm_mailtext="${trm_mailtext}</pre></body></html>"
|
||||
|
|
|
@ -234,13 +234,13 @@ f_vpn() {
|
|||
if [ "${vpn_status}" = "true" ] && [ "${iface}" != "${vpn_iface}" ]; then
|
||||
/sbin/ifdown "${iface}"
|
||||
f_log "info" "take down vpn interface '${iface}/${vpn_instance:-"-"}' (switch)"
|
||||
rm -f "${trm_vpnfile}"
|
||||
break
|
||||
fi
|
||||
if [ -x "/etc/init.d/openvpn" ] && [ -n "${vpn_instance}" ] && /etc/init.d/openvpn running "${vpn_instance}"; then
|
||||
/etc/init.d/openvpn stop "${vpn_instance}"
|
||||
f_log "info" "take down openvpn instance '${vpn_instance:-"-"}' (switch)"
|
||||
fi
|
||||
rm -f "${trm_vpnfile}"
|
||||
break
|
||||
done
|
||||
fi
|
||||
if [ -x "${trm_vpnpgm}" ] && [ -n "${vpn_service}" ] && [ -n "${vpn_iface}" ]; then
|
||||
|
@ -952,7 +952,7 @@ f_main() {
|
|||
if [ -n "${scan_quality}" ] && [ -n "${scan_open}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]; then
|
||||
f_log "debug" "f_main-7 ::: radio(sta/scan): ${sta_radio}/${radio}, essid(sta/scan): \"${sta_essid}\"/${scan_essid}, bssid(sta/scan): ${sta_bssid}/${scan_bssid}, quality(min/scan): ${trm_minquality}/${scan_quality}, open: ${scan_open}"
|
||||
if [ "${scan_quality}" -lt "${trm_minquality}" ]; then
|
||||
continue 3
|
||||
continue 2
|
||||
elif [ "${scan_quality}" -ge "${trm_minquality}" ]; then
|
||||
if [ "${trm_autoadd}" = "1" ] && [ "${scan_open}" = "+" ] && [ "${scan_essid}" != "unknown" ]; then
|
||||
open_essid="${scan_essid%?}"
|
||||
|
|
Loading…
Reference in New Issue