Mam skript over.sh, ktery se mi neukonci, porad bezi dokola, dokud ho neshodim. Co mam napsat na konci, aby po posledni prikazu prestal? Exit 0 nefunguje...
if ! source ~/settings.conf; then
echo "FAILURE: Can not load global settings 'settings.conf'"
exit 9
fi
export DISPLAY=:0
# Graphics card 1 to 19
for MY_DEVICE in {0..18}
do
# Check if card exists
if nvidia-smi -i $MY_DEVICE >> /dev/null 2>&1; then
#FanControlState
nvidia-settings -a "[gpu:0]/GPUFanControlState=1"
#PowerMizerMode
nvidia-settings -a "[gpu:0]/GPUPowerMizerMode=1"
# Fan
nvidia-settings -a "[fan:0]/GPUTargetFanSpeed=80"
# PL
sudo nvidia-smi -i 0,1,2,3,4,5 -pl 160
fi
done
echo
echo "Done"
echo
exit 0