kopia lustrzana https://github.com/FreeSpacenav/spacenavd
				
				
				
			
		
			
				
	
	
		
			48 wiersze
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
			
		
		
	
	
			48 wiersze
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
| #!/bin/sh
 | |
| #
 | |
| # spacenavd      free driver for 3Dconnexion 6dof devices
 | |
| #
 | |
| # chkconfig: 2345 99 99
 | |
| # description: A free user space driver for 3Dconnexion input devices,\
 | |
| #              compatible with the proprietary 3dxsrv daemon.
 | |
| #
 | |
| #
 | |
| ### BEGIN INIT INFO
 | |
| # Provides:          spacenavd
 | |
| # Required-Start:    $remote_fs $syslog
 | |
| # Required-Stop:     $remote_fs $syslog
 | |
| # Default-Start:     2 3 4 5
 | |
| # Default-Stop:      0 1 6
 | |
| # Short-Description: free driver for 3Dconnexion 6dof devices
 | |
| # Description:       A free user space driver for 3Dconnexion input devices, compatible with the proprietary 3dxsrv daemon.
 | |
| ### END INIT INFO
 | |
| 
 | |
| DAEMON=/usr/local/bin/spacenavd
 | |
| 
 | |
| [ -x "$DAEMON" ] || exit 0
 | |
| 
 | |
| case "$1" in
 | |
| start)
 | |
| 	echo 'Starting spacenavd daemon'
 | |
| 	$DAEMON -v
 | |
| 	;;
 | |
| 
 | |
| stop)
 | |
| 	echo 'Stopping spacenavd daemon'
 | |
| 	# detect daemon's process id
 | |
| 	pid=`cat /var/run/spnavd.pid 2>/dev/null`
 | |
| 	if [ $? != 0 ]; then
 | |
| 		pid=`ps -e | grep spacenavd | awk '{ print $1 }'`
 | |
| 		if [ -z "$pid" ]; then
 | |
| 			echo 'spacenavd daemon is not running, nothing to do.'
 | |
| 			exit 1
 | |
| 		fi
 | |
| 	fi
 | |
| 	kill $pid
 | |
| 	;;
 | |
| 
 | |
| reload|restart|force-reload)
 | |
| 	$0 stop && sleep 1 && $0 start
 | |
| 	;;
 | |
| esac
 |