From 9843a8c464ebcf5c1c91d520b1474ef9fda75647 Mon Sep 17 00:00:00 2001 From: kake26 Date: Sat, 30 Mar 2024 13:43:23 -0500 Subject: [PATCH] save point --- ntfy.bash | 12 ++++++++++++ script.bash | 14 +++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ntfy.bash diff --git a/ntfy.bash b/ntfy.bash new file mode 100644 index 0000000..9c84f39 --- /dev/null +++ b/ntfy.bash @@ -0,0 +1,12 @@ +#!/bin/bash + +# check for curl + +if ! command -v curl &> /dev/null +then + echo "This module needs curl to be installed." + exit +fi + +ntfyserver="http://192.168.168:83" + diff --git a/script.bash b/script.bash index 50f60c2..079eacc 100644 --- a/script.bash +++ b/script.bash @@ -10,11 +10,23 @@ fi trap cleanup EXIT # A little more robust cleanup +# trap errors and set the ERR trap +trap 'echo -e "\nERROR: $BASH_COMMAND\nFILE: ${BASH_SOURCE[0]}\nLINE: ${BASH_LINENO[0]}\n" >&2; exit 1' ERR + cleanup() { # We can clean up any temp files or what nots, but for now a place holder true } + source ./config_json.bash # can be json or ini, I preffer json -# Code goes here \ No newline at end of file +# Code goes here + +eval "echo "Hello World"" +eval "moo" +eval "echo "cow"" +#runcmd 'false' +#runcmd 'echo "moo"' + +