mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2026-01-06 18:23:15 +00:00
Shell script "stop-all-boxes.sh" has been added, so if there are multiple sets of boxes and you want to turn them all off you can.
26 lines
624 B
Bash
26 lines
624 B
Bash
#!/bin/bash
|
|
|
|
# Function will call stop-all-channels.sh on ALL current boxes.
|
|
# The purpose of this falls mainly to a kind of soft "reset", as well as for channel updating.
|
|
|
|
CHANNEL_DIR_INCREMENT_SYMBOL="_"
|
|
MASTERDIRECTORY="channels"
|
|
|
|
|
|
cd ..
|
|
BOX_DIR_ARR=( $(find . -maxdepth 1 -type d -name 'channels'"$CHANNEL_DIR_INCREMENT_SYMBOL"'*' -printf "%P\n" | sort -t"$CHANNEL_DIR_INCREMENT_SYMBOL" -n) )
|
|
BOX_DIR_ARR+=("${MASTERDIRECTORY}")
|
|
echo "+++++ FOUND THE FOLLOWING BOXES: ${BOX_DIR_ARR[@]}"
|
|
|
|
|
|
for BOX in "${BOX_DIR_ARR[@]}"
|
|
do
|
|
cd ${BOX}
|
|
echo "+++++ CURRENTLY STOPPING ${BOX}"
|
|
|
|
sudo ./stop-all-channels.sh
|
|
|
|
cd ..
|
|
done
|
|
|