Skip to content

Commit

Permalink
Merge pull request #1208 from sktometometo/PR/add-fetch-etc-files
Browse files Browse the repository at this point in the history
[jsk_fetch_startup] add fetch etc files
  • Loading branch information
k-okada authored May 24, 2022
2 parents c57dc82 + 9508733 commit 3d65836
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ for file in $(ls ./*.conf); do
echo "copied $file to /etc/init"
done

set +x
set +x
8 changes: 7 additions & 1 deletion jsk_fetch_robot/jsk_fetch_startup/scripts/log-wifi-link.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

IFACE=wlan0
OUTPATH=/var/log/wifi.log
INTERVAL=10

wifi_status(){
Expand All @@ -13,7 +14,12 @@ wifi_status(){
echo "$(date -Iseconds),$ssid,$freq,$signal,$level,$noise,$bitrate"
}

OUTDIR=$(dirname $OUTPATH)
if [ ! -d $OUTDIR ]; then
mkdir -p $OUTDIR
fi

while true; do
wifi_status >&1
wifi_status >> $OUTPATH
sleep $INTERVAL
done

0 comments on commit 3d65836

Please sign in to comment.