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 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
|
2019-10-21 19:15:51 +00:00
|
|
|
sleep 5; # Delays script before it's called again
|
2019-10-21 18:44:10 +00:00
|
|
|
echo $OUTPUT
|
2019-10-21 18:20:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run
|