Reply To: [SOLVED] Infrared remote for Max2Play rpi Squeezebox

Max2Play Home Forums Max2Play as Squeezebox (Player / Server) [SOLVED] Infrared remote for Max2Play rpi Squeezebox Reply To: [SOLVED] Infrared remote for Max2Play rpi Squeezebox

20. Januar 2016 at 22:30 #18031

Here is the script I start via crontab @reboot

#!/bin/bash                                                                                                         
                                                                                                                    
# Nur ausführen, wenn jivelite im Autostart                                                                         
autostart=$(grep -a "jivelite=1" /opt/max2play/autostart.conf | wc -l)                                              
if [ $autostart -eq 0 ];                                                                                            
then                                                                                                                
  echo "Jivelite nicht im Autostart - irxevent wird nicht gestartet!"                                               
  exit 0                                                                                                            
fi                                                                                                                  
                                                                                                                    
# Warten bis jivelite gestartet ist                                                                                 
while [ -z "$(pidof jivelite)" ];                                                                                   
do                                                                                                                  
  sleep 1                                                                                                           
done                                                                                                                
                                                                                                                    
# Warten bis Lircd gestartet ist                                                                                    
while [ -z "$(pidof lircd)" ];                                                                                      
do                                                                                                                  
  sleep 1                                                                                                          
done                                                                                                                
                                                                                                                    
if [ -z "$(pidof irxevent)" ];                                                                                      
then                                                                                                                
  echo "Starte irxevent!"                                                                                           
  echo 'DISPLAY=:0 irxevent -d /etc/lirc/lircrc'                                                                 
else                                                                                                                
  echo "Starte irxevent neu!"                                                                                       
  echo 'sudo kill “$(pidof irxevent)“'                                                                            
  sleep 1                                                                                                           
  echo 'DISPLAY=:0 irxevent -d /etc/lirc/lircrc'                                                                
fi                                                                                                                  
                                                                                                                    
exit 0
  • This reply was modified 8 years, 3 months ago by Bort.
  • This reply was modified 8 years, 3 months ago by Bort.