add hostname to voice message
This commit is contained in:
		
							parent
							
								
									5cb8d92b91
								
							
						
					
					
						commit
						4ac12ea156
					
				| 
						 | 
				
			
			@ -5,6 +5,7 @@ _target_file="/tmp/pacman-update-count"
 | 
			
		|||
_notify_none=0
 | 
			
		||||
_error_code=0
 | 
			
		||||
_show_help=0
 | 
			
		||||
_hostname=$(hostname)
 | 
			
		||||
 | 
			
		||||
if ! [ -f "$_target_file" ] ;
 | 
			
		||||
then
 | 
			
		||||
| 
						 | 
				
			
			@ -43,9 +44,9 @@ if [ "$_updates_available" -gt 0 ] ; then
 | 
			
		|||
  if [ "$_updates_available" -lt 2 ] ; then
 | 
			
		||||
    _plural=""
 | 
			
		||||
  fi
 | 
			
		||||
  echo "Attention please: Update required: $_updates_available package$_plural" | festival --tts
 | 
			
		||||
  echo "Attention please: Update required for $_hostname: $_updates_available package$_plural" | festival --tts
 | 
			
		||||
  notify-send "Update Notifier" "Update required: $_updates_available package$_plural"
 | 
			
		||||
elif [ "$_notify_none" -eq 1 ] ; then
 | 
			
		||||
  echo "Attention please: No package updates required" | festival --tts
 | 
			
		||||
  echo "Attention please: No package updates required for $_hostname" | festival --tts
 | 
			
		||||
  notify-send -u low "Update Notifier" "No updates required"
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue