restreamer/run.sh

35 lines
903 B
Bash
Raw Permalink Normal View History

2022-06-03 18:12:57 +02:00
#!/bin/sh
# Start script for the Restreamer bundle
# First run the import program. It will read the db.dir from the config file in order to
# find an old v1.json. This will be converted to the new db format.
2024-04-05 14:53:54 +02:00
if [ -x ./bin/import ]; then
./bin/import
if [ $? -ne 0 ]; then
exit 1
fi
2022-06-03 18:12:57 +02:00
fi
2022-11-09 12:51:57 +01:00
# Run the FFmpeg migration program. In case a FFmpeg 5 binary is present, it will create a
# backup of the current DB and modify the FFmpeg parameter such that they are compatible
# with FFmpeg 5.
2024-04-05 14:53:54 +02:00
if [ -x ./bin/ffmigrate ]; then
./bin/ffmigrate
if [ $? -ne 0 ]; then
exit 1
fi
2022-11-09 12:51:57 +01:00
fi
2022-06-03 18:12:57 +02:00
# Create a hint for the admin interface if there is no index.html
if ! [ -f "${CORE_STORAGE_DISK_DIR}/index.html" ]; then
cp /core/ui-root/index.html /core/ui-root/index_icon.svg ${CORE_STORAGE_DISK_DIR}
fi
# Now run the core with the possibly converted configuration.
2024-04-05 14:53:54 +02:00
exec ./bin/core