Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
14,404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # initial boot
  4. cd /storage/steamlink/ || exit 1
  5. [ -f /tmp/launch_steamlink ] && rm -f /tmp/launch_steamlink
  6.  
  7. while true; do
  8.   if [ -f /tmp/launch_steamlink ]; then
  9.     rm -f /tmp/launch_steamlink
  10.  
  11.     # stop kodi
  12.     systemctl stop kodi
  13.     while pidof kodi.bin &>/dev/null; do sleep 1; done
  14.  
  15.     # kodi stopped, launch steamlink
  16.     /storage/steamlink/steamlink.sh &> /storage/logfiles/steamlink.log
  17.     while pidof shell &>/dev/null; do sleep 1; done
  18.  
  19.     # steamlink stopped, restart kodi
  20.     systemctl start kodi
  21.   fi
  22.   sleep 1
  23. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement