2019-10-21 18:20:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-10-21 19:28:26 +00:00
|
|
|
# Example file, designed to be edited.
|
|
|
|
|
2019-10-21 19:40:41 +00:00
|
|
|
DELAY=5
|
2019-10-21 18:44:10 +00:00
|
|
|
MODULES_DIR="modules/"
|
|
|
|
SEPARATOR=" | "
|
|
|
|
|
2019-10-21 19:28:26 +00:00
|
|
|
MODULES="wifi internet bluetooth volume temperature date time battery"
|
2019-10-21 18:44:10 +00:00
|
|
|
|
|
|
|
run_modules(){
|
|
|
|
for module in $MODULES; do
|
|
|
|
[[ ! "$OUTPUT" = "" ]] && OUTPUT="$OUTPUT$SEPARATOR"
|
|
|
|
OUTPUT="$OUTPUT$(exec $MODULES_DIR$module)"
|
|
|
|
done
|
2019-10-21 18:20:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run(){
|
2019-10-21 18:44:10 +00:00
|
|
|
run_modules
|
|
|
|
echo $OUTPUT
|
2019-10-21 19:40:41 +00:00
|
|
|
sleep $DELAY;
|
2019-10-21 18:20:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run
|