save point
This commit is contained in:
parent
3acfcf1d68
commit
9843a8c464
2 changed files with 25 additions and 1 deletions
12
ntfy.bash
Normal file
12
ntfy.bash
Normal file
|
@ -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"
|
||||||
|
|
14
script.bash
14
script.bash
|
@ -10,11 +10,23 @@ fi
|
||||||
|
|
||||||
trap cleanup EXIT # A little more robust cleanup
|
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() {
|
cleanup() {
|
||||||
# We can clean up any temp files or what nots, but for now a place holder
|
# We can clean up any temp files or what nots, but for now a place holder
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
source ./config_json.bash # can be json or ini, I preffer json
|
source ./config_json.bash # can be json or ini, I preffer json
|
||||||
|
|
||||||
# Code goes here
|
# Code goes here
|
||||||
|
|
||||||
|
eval "echo "Hello World""
|
||||||
|
eval "moo"
|
||||||
|
eval "echo "cow""
|
||||||
|
#runcmd 'false'
|
||||||
|
#runcmd 'echo "moo"'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue