mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-06-02 08:50:08 +00:00
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/cd05ca56-d0e8-4260-988b-a7cc0747beff Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
73 lines
1.6 KiB
Bash
73 lines
1.6 KiB
Bash
#!/bin/bash
|
|
|
|
# Variables
|
|
if [ -z "$NC_DOMAIN" ]; then
|
|
echo "You need to provide the NC_DOMAIN."
|
|
exit 1
|
|
elif [ -z "$RECORDING_SECRET" ]; then
|
|
echo "You need to provide the RECORDING_SECRET."
|
|
exit 1
|
|
elif [ -z "$INTERNAL_SECRET" ]; then
|
|
echo "You need to provide the INTERNAL_SECRET."
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$HPB_DOMAIN" ]; then
|
|
export HPB_DOMAIN="$NC_DOMAIN"
|
|
fi
|
|
|
|
# Delete all contents on startup to start fresh
|
|
rm -fr /tmp/{*,.*}
|
|
|
|
cat << RECORDING_CONF > "/conf/recording.conf"
|
|
[logs]
|
|
# 10=debug 20=info 30=warning 40=error
|
|
$(case "${AIO_LOG_LEVEL:-warning}" in
|
|
debug) echo "level = 10" ;;
|
|
info) echo "level = 20" ;;
|
|
warning) echo "level = 30" ;;
|
|
error) echo "level = 40" ;;
|
|
*) echo "level = 30" ;;
|
|
esac)
|
|
|
|
[http]
|
|
listen = 0.0.0.0:1234
|
|
|
|
[backend]
|
|
allowall = ${ALLOW_ALL}
|
|
# The secret below is still needed if allowall is set to true, also it doesn't hurt to be here
|
|
secret = ${RECORDING_SECRET}
|
|
backends = backend-1
|
|
skipverify = ${SKIP_VERIFY}
|
|
maxmessagesize = 1024
|
|
videowidth = 1920
|
|
videoheight = 1080
|
|
directory = /tmp
|
|
|
|
[backend-1]
|
|
url = ${NC_PROTOCOL}://${NC_DOMAIN}
|
|
secret = ${RECORDING_SECRET}
|
|
skipverify = ${SKIP_VERIFY}
|
|
|
|
[signaling]
|
|
signalings = signaling-1
|
|
|
|
[signaling-1]
|
|
url = ${HPB_PROTOCOL}://${HPB_DOMAIN}${HPB_PATH}
|
|
internalsecret = ${INTERNAL_SECRET}
|
|
|
|
[ffmpeg]
|
|
# common = ffmpeg -loglevel level+warning -n
|
|
# outputaudio = -c:a libopus
|
|
# outputvideo = -c:v libvpx -deadline:v realtime -crf 10 -b:v 1M
|
|
extensionaudio = .ogg
|
|
extensionvideo = .webm
|
|
|
|
[recording]
|
|
browser = firefox
|
|
driverPath = /usr/bin/geckodriver
|
|
browserPath = /usr/bin/firefox
|
|
RECORDING_CONF
|
|
|
|
exec "$@"
|