Prevent starting multiple modemmonitor on logout/login
Signed-off-by: Stacy Harper <contact@stacyharper.net> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
		
							parent
							
								
									de0697a83c
								
							
						
					
					
						commit
						65270eaea8
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -9,8 +9,8 @@
 | 
			
		|||
. "$(dirname "$0")/sxmo_common.sh"
 | 
			
		||||
 | 
			
		||||
if [ "$1" != "on" ] && pgrep -f sxmo_modemmonitor.sh; then
 | 
			
		||||
	pgrep -f sxmo_modemmonitor.sh | grep -Ev "^${$}$" | xargs -IP kill -TERM P
 | 
			
		||||
elif [ "$1" != "off" ]; then
 | 
			
		||||
	pkill -TERM -f sxmo_modemmonitor.sh
 | 
			
		||||
elif [ "$1" != "off" ] && ! pgrep -f sxmo_modemmonitor.sh; then
 | 
			
		||||
	setsid -f sxmo_modemmonitor.sh &
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue