This commit is contained in:
parent
82739c1ff0
commit
b85f878201
9 changed files with 133 additions and 0 deletions
15
roles/music/templates/bitvis-tee.service
Normal file
15
roles/music/templates/bitvis-tee.service
Normal file
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Multiplexer for bitvis
|
||||
Before=bitvis.service
|
||||
After=bitvis-http.service
|
||||
Requires=bitvis-http.service
|
||||
PropagatesStopTo=bitvis.service
|
||||
StopPropagatedFrom=bitvis.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/screen -dmS bitvis-tee /opt/bitvis-tee.sh
|
||||
User={{ music_bitvis_user }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
10
roles/music/templates/bitvis-tee.sh
Normal file
10
roles/music/templates/bitvis-tee.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# {{ ansible_managed }}
|
||||
|
||||
loop=`mktemp --suffix -bitvis`
|
||||
mkfifo -f "$loop"
|
||||
trap "rm -f $loop" EXIT TERM
|
||||
|
||||
cat "$loop" | while true; do nc -4 -w 2 localhost 1338; done &
|
||||
nc -klp 1337 | tee "$loop" | while true; do nc -w 2 {{ music_bitpanel_host }} {{ music_bitpanel_port }}; done
|
16
roles/music/templates/bitvis.service
Normal file
16
roles/music/templates/bitvis.service
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=Audio visualizer for the bitpanel
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=10s
|
||||
ExecStart=/usr/bin/pw-jack bitvis -a localhost -p 1337 -m localhost -o 6600
|
||||
ExecStartPost=/usr/bin/sleep 4
|
||||
ExecStartPost=/usr/bin/pw-link alsa_output.usb-ASUS_Xonar_U7_MKII-00.analog-stereo:monitor_FR bitvis:input
|
||||
User={{ music_audio_user }}
|
||||
Environment="XDG_RUNTIME_DIR=/run/user/{{ music_audio_user_id }}"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue