Generate first empty file at container startup
This commit is contained in:
parent
628e4d3d55
commit
bb8e4cdbfa
3 changed files with 14 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ dist/
|
||||||
rec/
|
rec/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
/venv
|
/venv
|
||||||
|
/docker/output/*
|
||||||
|
|
|
@ -7,11 +7,11 @@ services:
|
||||||
dockerfile: docker/Dockerfile.liquidsoap
|
dockerfile: docker/Dockerfile.liquidsoap
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/run.liq:/run.liq
|
- ./docker/run.liq:/run.liq
|
||||||
- ./docker/ror.sh:/ror.sh
|
- ./docker/run.sh:/run.sh
|
||||||
- rec:/rec
|
- rec:/rec
|
||||||
devices:
|
devices:
|
||||||
- /dev/snd:/dev/snd
|
- /dev/snd:/dev/snd
|
||||||
entrypoint: /run.liq
|
entrypoint: /run.sh
|
||||||
depends_on:
|
depends_on:
|
||||||
- storageprepare
|
- storageprepare
|
||||||
|
|
||||||
|
|
11
docker/run.sh
Executable file
11
docker/run.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -xueo pipefail
|
||||||
|
|
||||||
|
FILEPATH="/rec/ror/$(date +%Y-%m)/$(date +%d)/rec-$(date +%Y-%m-%d-%H)-00-00.mp3"
|
||||||
|
mkdir -p $(dirname ${FILEPATH})
|
||||||
|
if ! [[ -f ${FILEPATH} ]]; then
|
||||||
|
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t 3600 -acodec mp3 ${FILEPATH}
|
||||||
|
fi
|
||||||
|
|
||||||
|
/run.liq
|
Loading…
Reference in a new issue