Skip to content

Instantly share code, notes, and snippets.

View cynicastic's full-sized avatar

cynicastic

  • Grace L. Ferguson Airline & Storm Door Co.
  • In a maze of twisty little passages, all alike
View GitHub Profile
@cynicastic
cynicastic / fetch-ntp
Last active June 23, 2019 18:03
Fetch time from ntp server (call from Asuswrt-Merlin init-start script)
#!/bin/sh
#
# Script: fetch-ntp
#
# script to get time from time server as quickly as possible
#
# this works best when the router is NOT the NTP server for your LAN,
# that is, the IP address you are pointing at here is the same IP
# address listed in the Administration -> System -> NTP Server
#
@cynicastic
cynicastic / post-mount
Last active June 15, 2019 15:07
Keep shell history in asuswrt with Entware
#!/bin/sh
# File description below copied from https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts#post-mount
#
# Called just after a partition got mounted. The script is passed the mount point (the filesystem path where
# the partition was mounted, e.g. /tmp/mnt/OPT) as an argument which can be used in the script using $1.
#
# If using Diversion (https://www.snbforums.com/threads/diversion-the-router-ad-blocker.48538/),
# shell history (sh) should be turned off when using this script