summaryrefslogtreecommitdiff
path: root/wlanWDprowl.sh
diff options
context:
space:
mode:
authorst33v <github@f3rr3t.com>2017-11-19 11:01:29 +1100
committerst33v <github@f3rr3t.com>2017-11-19 11:01:29 +1100
commit20636c0881b1501005dc7f10deef866fae39b436 (patch)
tree870a5af02123532b403b69d4c5b07bd928fc31cf /wlanWDprowl.sh
parentb4113d7c930f722bb8fcac646e06500309cfc36c (diff)
shell script stub
Diffstat (limited to 'wlanWDprowl.sh')
-rwxr-xr-xwlanWDprowl.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/wlanWDprowl.sh b/wlanWDprowl.sh
new file mode 100755
index 0000000..3955346
--- /dev/null
+++ b/wlanWDprowl.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# wlanWDprowl.sh
+# SJP 19 Nov 2017
+#
+# Designed to stop a headless wireless raspi from disappearing from the LAN.
+# IS called from a systemd timer
+#
+cd /usr/local/bin
+# The following block enables private configuration
+logdir="/path/to/my/log" # overwritten by sourcing from .logdir.config
+if [ -e logdir.config ]; then
+ . logdir.config # source directory name from local config file
+else echo "logdir.config does not exist"; exit 1
+fi
+# end of privacy config
+
+# Detect the state of the wireless network adaptor
+wirelessLink='wlan0' # ymmv
+networkctl status ${wirlesessLink} | grep 'State:'
+
+