-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathudev_default.sh
executable file
·44 lines (40 loc) · 1.18 KB
/
udev_default.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/bash
#*********************************
#
# ToxBlinkenwall - udev script - part 1
# (C)Zoff in 2017 - 2019
#
# https://github.com/zoff99/ToxBlinkenwall
#
# in this file: /lib/systemd/system/systemd-udevd.service
# comment out these lines, or the script will fail mostly:
#
# KillMode=mixed
# WatchdogSec=3min
# TasksMax=infinity
# MountFlags=slave
# MemoryDenyWriteExecute=yes
# RestrictRealtime=yes
# RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
#
#
#*********************************
####################################
#
# create the script:
# /etc/udev/rules.d/80-plug-usb-device.rules
#
# KERNEL=="sd*[!0-9]", ACTION=="add", RUN+="/home/pi/ToxBlinkenwall/toxblinkenwall/udev.sh '%E{DEVNAME}'"
#
# KERNEL=="pcmC[D0-9cp]*", DRIVERS=="usb", ACTION=="add", RUN+="/home/pi/ToxBlinkenwall/toxblinkenwall/udev.sh '%E{DEVNAME}'"
# KERNEL=="pcmC[D0-9cp]*", DRIVERS=="usb", ACTION=="remove", RUN+="/home/pi/ToxBlinkenwall/toxblinkenwall/udev.sh '%E{DEVNAME}'"
# as root
#
#
# systemctl restart systemd-udevd
# systemctl daemon-reload
#
#
###################################
$(dirname "$0")/detect_usb_audio.sh "$1" "$2" "$3" &
$(dirname "$0")/process_usb_drive.sh "$1" "$2" "$3" &