feat: add systemd services for infinite silence
This commit is contained in:
parent
c62e55b656
commit
ef86afe3bf
3 changed files with 33 additions and 0 deletions
11
infinite-silence-stream.service
Normal file
11
infinite-silence-stream.service
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Infinite silence stream
|
||||||
|
Requires=jackd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/ffmpeg -ac 1 -f jack -i infinite-silence -c:a libmp3lame -b:a 192k -ac 1 -content_type 'audio/mpeg' -f mp3 icecast://source:iamapassword@localhost:8016/silence
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
Also=jackd.service
|
||||||
|
WantedBy=default.target
|
13
infinite-silence.service
Normal file
13
infinite-silence.service
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Complete silence, always
|
||||||
|
Requires=jackd.service
|
||||||
|
Requires=infinite-silence-stream.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/python3 /home/ash/silence/infinite-silence.py infinite-silence 5 30 /home/ash/silence/sfx.mp3
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
Also=jackd.service
|
||||||
|
Also=infinite-silence-stream.service
|
||||||
|
WantedBy=default.target
|
9
jackd.service
Normal file
9
jackd.service
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=jackd
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/jackd -t5000 -r -dalsa -r48000 -n3
|
||||||
|
Restart=no-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
Loading…
Reference in a new issue