X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2Fshh;h=c5df1ed30b7dc1e472b40bb1eba82811d479a1e9;hb=303dc52607bb0bb80e9e78a446960c1ecf30f89b;hp=7e82eba81ed90c29bcc4169d9b04a1195e3aaa09;hpb=7c5076668edce6b5650d075701b59ab710677e3d;p=clearscm.git diff --git a/bin/shh b/bin/shh index 7e82eba..c5df1ed 100755 --- a/bin/shh +++ b/bin/shh @@ -1,5 +1,4 @@ #!/bin/bash -timeout=5000 # 5 seconds touchfile=/opt/clearscm/data/shh # This just toggles the creation of the /opt/clearscm/bin/shh file @@ -8,9 +7,11 @@ if [ -f $touchfile ]; then cp ~/.icons/ShhOff.png ~/.icons/Shh.png else # Stop currently playing audio - killall play + killall play 2> /dev/null # Stop any Google TTS - kill -9 $(cat /tmp/simple_google_tts.pid) + if [ -f /tmp/simple_google_tts.pid ]; then + kill -9 $(cat /tmp/simple_google_tts.pid) + fi # Clean up tmp rm -rf /tmp/simple_google_tts.* # Touch shh file