diff --git a/commando.bash b/commando.bash new file mode 100644 index 0000000..c05bf3d --- /dev/null +++ b/commando.bash @@ -0,0 +1,20 @@ +#!/bin/bash + +# commando.bash + +set -eo pipefail # you cann add u into -eo, but it drives me nuts so I won't + +if [[ -n "${BASHD_DEBUG}" ]]; then # aievitability that this will be used + set -x +fi + + trap cleanup EXIT # A little more robust cleanup + + cleanup() { + # We can clean up any temp files or what nots, but for now a place holder + true + } + +source ./config.bash + +token=$(read_json "$JSON_FILE" "ntfy" "token") \ No newline at end of file diff --git a/config.bash b/config.bash index 8c6ff54..4e5a9bf 100644 --- a/config.bash +++ b/config.bash @@ -31,7 +31,7 @@ write_json() { create_json() { local JSON_FILE="$1" echo '{"bashini": "new"}' | jq '.' > "$JSON_FILE" # well we need something in there - write_json "$JSON_FILE" "restic" "password" "backupsarefun" # for the openwrt backup script here for testing + } check_json() {