Skip to content
Snippets Groups Projects
50-gluon-setup-mode 408 B
Newer Older
  • Learn to ignore specific revisions
  • #!/bin/sh
    
    
    wait=3
    
    
    wait_setup_mode() {
    	sleep $wait
    
    	gluon-enter-setup-mode
    
    if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ]; then
    
    	case "$ACTION" in
    		pressed)
    			wait_setup_mode &
    			PID=$!
    			echo $PID > /tmp/.wait_setup_mode
    			;;
    		released)
    			if [ -r /tmp/.wait_setup_mode ]; then
    
    				kill "$(cat /tmp/.wait_setup_mode)"