ConfigScriptEtc: wiimote

File wiimote, 0.9 kB (added by xkill, 5 years ago)

Start script for init.d. If you use 0.6.00_rc2 or minor. You need to apply the wminput patch #38 for standby mode at ticket:38

Line 
1#!/bin/bash
2#
3# Script to start and stop wminput - (c) 2007 Pablo Catalina <xkill@ciberhell.ath.cx>
4#
5# This is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10## BEGIN USER CONFIGURATION ##
11#
12# Set the always connect wait time
13        WAIT_TIME=30
14# Set the config file
15        CONF="ir_ptr"
16# Set the mac of your wiimote
17        WIIMOTE=00:19:1D:6E:77:83
18# Set the logfile
19        LOG=/tmp/wiimote.log
20## END USER CONFIGURATION ##
21
22
23case "$1" in
24   'start')
25        /usr/local/bin/wminput -a $WAIT_TIME -w -c $CONF $WIIMOTE -d
26      ;;
27   'stop')
28        killall wminput
29      ;;
30   'restart')
31        killall wminput
32        sleep 1
33        /usr/local/bin/wminput -a $WAIT_TIME -w -c $CONF $WIIMOTE -d
34      ;;
35   *)
36      echo "usage $0 start|stop|restart"
37      exit 1 ;;
38esac
39