mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-06-04 03:10:51 +00:00
Added shellcheck source for background script examples
This commit is contained in:
parent
676a69465d
commit
d64ba40b63
|
@ -24,6 +24,7 @@ unset IFS
|
||||||
# discard STDIN for background jobs!
|
# discard STDIN for background jobs!
|
||||||
cat >/dev/null &
|
cat >/dev/null &
|
||||||
|
|
||||||
|
# shellcheck source=examples/background-scripts/mycommands.sh
|
||||||
source "./mycommands.sh"
|
source "./mycommands.sh"
|
||||||
|
|
||||||
# check if $1 is a number
|
# check if $1 is a number
|
||||||
|
|
|
@ -24,6 +24,8 @@ cat >/dev/null &
|
||||||
|
|
||||||
# watch for new files created by a trusted program
|
# watch for new files created by a trusted program
|
||||||
WATCHDIR="/my_trusted/dir_to_watch"
|
WATCHDIR="/my_trusted/dir_to_watch"
|
||||||
|
|
||||||
|
# shellcheck source=examples/background-scripts/mycommands.sh
|
||||||
source "./mycommands.sh"
|
source "./mycommands.sh"
|
||||||
|
|
||||||
# test your script and the remove ...
|
# test your script and the remove ...
|
||||||
|
@ -39,4 +41,3 @@ loop_callback() {
|
||||||
}
|
}
|
||||||
|
|
||||||
watch_dir_loop "$WATCHDIR"
|
watch_dir_loop "$WATCHDIR"
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,13 @@ export 'LANGUAGE=C.UTF-8'
|
||||||
unset IFS
|
unset IFS
|
||||||
# set -f # if you are paranoid use set -f to disable globbing
|
# set -f # if you are paranoid use set -f to disable globbing
|
||||||
|
|
||||||
# discard STDIN for background jobs!
|
# shellcheck source=examples/background-scripts/mycommands.sh
|
||||||
cat >/dev/null &
|
cat >/dev/null &
|
||||||
|
|
||||||
# watch for new logfiles
|
# watch for new logfiles
|
||||||
WATCHDIR="/var/log"
|
WATCHDIR="/var/log"
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source "./mycommands.sh"
|
source "./mycommands.sh"
|
||||||
|
|
||||||
# test your script and the remove ...
|
# test your script and the remove ...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user