Ребята, подскажите плиз как сделать короче, мне для красоты нужно.
if [ $tunnel_last_state -eq 1 ] && [ $internet_last_state -eq 1 ];
then
echo none > /sys/class/leds/red/trigger
echo default-on > /sys/class/leds/blue/trigger
fi
if [ $tunnel_last_state -eq 1 ] && [ $internet_last_state -eq 0 ];
then
echo default-on > /sys/class/leds/red/trigger
echo none > /sys/class/leds/blue/trigger
fi
if [ $tunnel_last_state -eq 0 ] && [ $internet_last_state -eq 1 ];
then
echo none > /sys/class/leds/red/trigger
echo timer > /sys/class/leds/blue/trigger
fi
if [ $tunnel_last_state -eq 0 ] && [ $internet_last_state -eq 0 ];
then
echo timer > /sys/class/leds/red/trigger
echo none > /sys/class/leds/blue/trigger
fi
Спасибо!