Skip to content

Commit

Permalink
Add Shortcuts for Log files to help with terminal (#402)
Browse files Browse the repository at this point in the history
* Update oref0-setup.sh

added all log files shortcuts to .bash_profile

* Update oref0-setup.sh

fix errors

* Update oref0-setup.sh

to avoid having wrong command run added log to end of alias

* Sort treatments before calculating COB (#404)

* sort treatments

* sort treatments by actual datestamp

* Create oref0-log-shortcuts.sh

bash Script to add shortcuts to the OpenAPS logs

* Update oref0-setup.sh

Change log shortcuts to run during install from a Bash script.

* Update package.json

add oref0-log-shortcuts

* Update oref0-setup.sh

* Automatically copy pumpprofile.json & autotune.json from profile.json (#392)

* auto copy pumpprofile.json & autotune.json from profile.json

* allow manual users to run autotune by simply creating a settings/pumpprofile.json file, #392

* simple -> simply

* Autotune: Porting to Python - oref0-autotune.py (#403)

* bin/oref0-autotune.py initial

* add notes, make autotune_core call easier to read

* add nightscout log messages

* remove nightscout url validation for now

* ensure uniform date format for filenames

* more date fixes

* missing (

* more missing )s

* add expand-user for DIRs with ~ or ~user

* remove character with different encoding

* fix missing bluetooth command line options in oref0-runagain.sh (#405)

* Install missing jq dependency when --btpeb is set. (#408)

* spidev5.1 already in use reboot (#411)

* oref0-radio-reboot

* oref0-radio-reboot

* oref0-radio-reboot

* wait 5m to reboot; cancel if it recovers by then

* run oref0-radio-reboot in cron two more times before actually rebooting

* /run/nologin only exists for 5m; run every minute

* print extra newlines to clear old spidev5.1 errors faster

* don't extend reboot time every minute

* write cancelation to logfile

* Changes to oref0-online (#396)

Replace how we get the SSID, use iwgetid instead.
Replace how we the IP of the wlan and beep interfaces to us the ip command.

* Update oref0-setup.sh

* simplify last remaining iwconfig

* cp without -up on Mac (#416)

* Delete Future Data for better recovery of Time on System during No network power on for edison (#413)

* Create oref0-delete-future-entries.sh

* Update package.json

add oref0-delete-future-entries

* Update oref0-setup.sh

add oref0-delete-future-entries to a reboot in the cron

* Update oref0-setup.sh

* Alphabetize

* remove extra whitespace
  • Loading branch information
Bender1061 authored and scottleibrand committed Mar 9, 2017
1 parent d12855b commit c2cfc8f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/oref0-log-shortcuts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# add crontab entries
grep -q "networklog" ".bash_profile" || echo "alias networklog="'"tail -n 100 -F /var/log/openaps/network.log"' >> ".bash_profile"
grep -q "xdrip-looplog" ".bash_profile" || echo "alias xdrip-looplog="'"tail -n 100 -F /var/log/openaps/xdrip-loop.log"' >> ".bash_profile"
grep -q "cgm-looplog" ".bash_profile" || echo "alias cgm-looplog="'"tail -n 100 -F /var/log/openaps/cgm-loop.log"' >> ".bash_profile"
grep -q "autosens-looplog" ".bash_profile" || echo "alias autosens-looplog="'"tail -n 100 -F /var/log/openaps/autosens-loop.log"' >> ".bash_profile"
grep -q "autotunelog" ".bash_profile" || echo "alias autotunelog="'"tail -n 100 -F /var/log/openaps/autotune.log"' >> ".bash_profile"
grep -q "pump-looplog" ".bash_profile" || echo "alias pump-looplog="'"tail -n 100 -F /var/log/openaps/pump-loop.log"' >> ".bash_profile"
grep -q "urchin-looplog" ".bash_profile" || echo "alias urchin-looplog="'"tail -n 100 -F /var/log/openaps/urchin-loop.log"' >> ".bash_profile"

# to enable shortcut aliases in ~/.bash_profile
source ~/.bash_profile
3 changes: 3 additions & 0 deletions bin/oref0-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,9 @@ echo Add NIGHTSCOUT_HOST and API_SECRET to $HOME/.profile
(cat $HOME/.profile | grep -q "NIGHTSCOUT_HOST" || echo export NIGHTSCOUT_HOST="$NIGHTSCOUT_HOST") >> $HOME/.profile
(cat $HOME/.profile | grep -q "API_SECRET" || echo export API_SECRET="`nightscout hash-api-secret $API_SECRET`") >> $HOME/.profile

echo "Adding OpenAPS log shortcuts"
oref0-log-shortcuts

echo
if [[ "$ttyport" =~ "spi" ]]; then
echo Resetting spi_serial
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"oref0-get-profile": "./bin/oref0-get-profile.js",
"oref0-html": "./bin/oref0-html.js",
"oref0-ifttt-notify": "./bin/oref0-ifttt-notify",
"oref0-log-shortcuts": "./bin/oref0-log-shortcuts.sh",
"oref0-mdt-trend": "./bin/oref0-mdt-trend.js",
"oref0-meal": "./bin/oref0-meal.js",
"oref0-mint-max-iob": "./bin/oref0-mint-max-iob.sh",
Expand Down

0 comments on commit c2cfc8f

Please sign in to comment.