Skip to content

Commit af35615

Browse files
committed
Catch init errors
Without the if statement, the pkill might throw an error, which causes the init script to crash.
1 parent 344a04b commit af35615

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mythpywii.conf

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ start on (local-filesystems
88
stop on stopping dbus
99

1010
script
11-
pkill -f /usr/local/bin/myth_py_wii.py
11+
if pgrep -f /usr/local/bin/myth_py_wii.py; then
12+
pkill -f /usr/local/bin/myth_py_wii.py
13+
fi
1214
bluetooth_devices=$(lsusb |
1315
grep "Broadcom Corp. BCM2046B1 USB 2.0 Hub" |
1416
cut -d ':' -f 1 |

0 commit comments

Comments
 (0)