Add script for auto-retry on device loss
This commit is contained in:
parent
c29a3b5e91
commit
fd7421254e
3 changed files with 21 additions and 9 deletions
19
examples/evdev-accel-service.sh
Executable file
19
examples/evdev-accel-service.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Script for running evdev-accel again on device loss
|
||||
#
|
||||
|
||||
DEVICE="Your device name here"
|
||||
|
||||
while true; do
|
||||
evdev-accel -d "$DEVICE"
|
||||
ex="$?"
|
||||
if [ $ex = 0 ]; then
|
||||
echo "evdev-accel exited with code 0, quitting"
|
||||
break
|
||||
fi
|
||||
echo "evdev-accel exited with code $ex, retrying in 1 second"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue