X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=bin%2Fshh;h=c5df1ed30b7dc1e472b40bb1eba82811d479a1e9;hb=7ddf095f187ca60d9a70fb83b2bc3c2b6d91f088;hp=7e82eba81ed90c29bcc4169d9b04a1195e3aaa09;hpb=75f06ef1cd56d531eb9ae086618bce3ff6aaa510;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