feat: add systemd services for infinite silence

This commit is contained in:
Ashhhleyyy 2024-04-15 10:20:32 +01:00
parent c62e55b656
commit ef86afe3bf
Signed by: ash
GPG key ID: 83B789081A0878FB
3 changed files with 33 additions and 0 deletions

View 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
View 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
View 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