Omnia Turris – random rainbow colours

Script for Omnia Turris making your router light with random colour every second.

 

 

 

#!/bin/bash
 
colors=('red' 'blue' 'green' 'white');
leds=('lan0' 'lan1' 'lan2' 'lan3' 'lan4' 'pwr' 'wan' 'pci1' 'pci2' 'pci3' 'usr1' 'usr2');
 
while true; do
    for led in "${leds[@]}"
    do
        rand_color=$[$RANDOM % 5]
        rainbow ${led} ${colors[rand_color]}
    done
    sleep 1;
done

To get this quickly working:

  1. login on your Turris router
  2. wget https://gitlab.com/snippets/34184/raw -O random_rainbow.sh
  3. bash random_rainbow.sh &
  4. you can logout now, script will be working in background
[Total: 1    Average: 4/5]