mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
travelmate: update to release 2.0
- new package dependency: curl (plus one of the wpad variants) - optional package dependencies: - 'msmtp' for email notification support - 'wireguard' or 'openvpn' for vpn support - removed WEP support, only WPA/WPA2/WPA3 are supported! - new, more robust setup wizard (CLI and LuCI) - more robust captive portal detection - randomize mac addresses with every uplnk connect - automatic vpn handling during uplink switch (only classic/simple client-setups for wireguard or openvpn are supported) - email notifications after successful uplink connections - automatically disable uplinks after n minutes, e.g. for timed connections - automatically (re-)enable uplinks after n minutes, e.g. after failed login attempts - complete LuCI rewrite - migrated to client side JS (separate PR) Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
# ntp hotplug script for travelmate
|
||||
# Copyright (c) 2020 Dirk Brenken (dev@brenken.org)
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
|
||||
# set (s)hellcheck exceptions
|
||||
# shellcheck disable=1091,2016,2039,2059,2086,2143,2181,2188
|
||||
|
||||
trm_init="/etc/init.d/travelmate"
|
||||
trm_ntpfile="/var/state/travelmate.ntp"
|
||||
trm_logger="$(command -v logger)"
|
||||
|
||||
f_log()
|
||||
{
|
||||
local class="${1}" log_msg="${2}"
|
||||
|
||||
if [ -x "${trm_logger}" ]
|
||||
then
|
||||
"${trm_logger}" -p "${class}" -t "trm-ntp [${$}]" "${log_msg}"
|
||||
else
|
||||
printf "%s %s %s\\n" "${class}" "trm-ntp [${$}]" "${log_msg}"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "${ACTION}" = "stratum" ] && [ ! -f "${trm_ntpfile}" ] && \
|
||||
[ "$("${trm_init}" enabled; printf "%u" ${?})" -eq "0" ]
|
||||
then
|
||||
> "${trm_ntpfile}"
|
||||
f_log "info" "get ntp time sync"
|
||||
"${trm_init}" restart
|
||||
fi
|
||||
Reference in New Issue
Block a user