Azonos terminálból indítva (display :0-ból):
# Test to see if XBMC is running first if pidof -s /usr/share/xbmc/xbmc.bin ; then # Try a clean kill echo "Closing xbmc!" ps aux|grep -i tv|grep -v grep|grep -i xbmc.bin|awk '{print $2}'|xargs kill echo "XBMC stoped (soft)" # takes a second or two to die with the soft kill sleep 2 if pidof -s /usr/share/xbmc/xbmc.bin ; then ps aux|grep -i tv|grep -v grep|grep -i xbmc.bin|awk '{print $2}'|xargs kill -9 echo "XBMC stoped (hard)" else echo "XBMC Stoped (soft)" fi else echo "Startup XBMC" xbmc fi echo "Done!"
Másik terminálból indítva (display :0-ra indítva):
# Test to see if XBMC is running first if pidof -s /usr/share/xbmc/xbmc.bin ; then # Try a clean kill echo "Closing xbmc!" ps aux|grep -v grep|grep -i xbmc.bin|awk '{print $2}'|xargs kill echo "XBMC stopped (soft)" # takes a second or two to die with the soft kill sleep 2 if pidof -s /usr/share/xbmc/xbmc.bin ; then ps aux|grep -v grep|grep -i xbmc.bin|awk '{print $2}'|xargs kill -9 echo "XBMC stopped (hard)" else echo "XBMC stopped (soft)" fi else echo "Startup XBMC" DISPLAY=:0 xbmc & fi echo "Done!"