diff --git a/aping.sh b/aping.sh index 3d34e0f..98858ee 100755 --- a/aping.sh +++ b/aping.sh @@ -9,7 +9,7 @@ site="google.com" #notification settings sound_player="espeak" -player_opts=("-v en-uk-north") +player_opts=("-v" "en-gb-x-gbclan") sound_file="" sound_message="The internet is working!" popup_box="false" @@ -41,7 +41,7 @@ withLoop(){ elif [ $ping_result = "0" ];then if [ "${play_sound}" = "true" ];then - ${sound_player} "${player_opts[@]}" ${sound_file} "${sound_message}" & + ${sound_player} "${player_opts[@]}" ${sound_file:+"${sound_file}"} "${sound_message}" & fi lanip=$(ip -o -4 addr show | awk '$2 != "lo" {sub(/\/.*/, "", $4); print $4}') @@ -89,7 +89,7 @@ withoutLoop(){ elif [ $ping_result = "0" ];then if [ "${play_sound}" = "true" ];then - ${sound_player} "${player_opts[@]}" "${sound_file}" "${sound_message}" & + ${sound_player} "${player_opts[@]}" ${sound_file:+"${sound_file}"} "${sound_message}" & fi