summaryrefslogtreecommitdiffstats
path: root/net/travelmate/files/25-travelmate.hotplug
blob: a61ed3e42aa1847946f0527b0e294c76dee6f342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# ntp hotplug script for travelmate
# Copyright (c) 2020-2026 Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the GNU General Public License v3.

# set (s)hellcheck exceptions
# shellcheck disable=all

trm_init="/etc/init.d/travelmate"
trm_funlib="/usr/lib/travelmate-functions.sh"
trm_ntplock="/var/lock/travelmate.ntp.lock"

if mkdir "${trm_ntplock}" 2>/dev/null; then
	if [ "${ACTION}" = "stratum" ] && "${trm_init}" enabled; then
		. "${trm_funlib}"
		f_log "info" "get ntp time sync"
	fi
fi