Skip to content

Instantly share code, notes, and snippets.

View JeremieRapin's full-sized avatar

Jérémie JeremieRapin

  • https://github.com/orgs/Overkiz/
View GitHub Profile
@JeremieRapin
JeremieRapin / hifi.rules
Created February 6, 2020 19:48
/etc/udev/rules.d/hifi.rules
ACTION=="remove", SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="0110", RUN+="/bin/systemctl stop spocon"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="0110", RUN+="/bin/systemctl start spocon"
#!/bin/sh
# Add the following line in /etc/crontab
# * * * * * root /home/pi/watchdog.sh
#
status=$(sudo systemctl status raspotify | grep -E "(WARN|ERROR|101)")
if [ ! -z "$status" ]; then
sudo systemctl restart raspotify