Instead of the trigger file and killing mpv, we loop the ring indefinitely until killed. Maybe we should still got a guardrail but I still never needed it (modemmonitor would trigger missed_call late or later ?) Signed-off-by: Stacy Harper <contact@stacyharper.net> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			391 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			391 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/usr/bin/env sh
 | |
| 
 | |
| # This script is executed (asynchronously) when you get an incoming call
 | |
| # You can use it to play a ring tone
 | |
| 
 | |
| # Start the mpv ring until another hook kill it
 | |
| mpv --quiet --no-video --loop /usr/share/sxmo/ring.ogg &
 | |
| MPVID=$!
 | |
| echo "$MPVID" > "$XDG_RUNTIME_DIR/sxmo.ring.pid"
 | |
| 
 | |
| # Vibrate while mpv is running
 | |
| while kill -0 $MPVID; do
 | |
| 		sxmo_vibratepine 1500
 | |
| 		sleep 0.5
 | |
| done
 |