Skip to content
Snippets Groups Projects
Commit 00a9a6f7 authored by Bob Mottram's avatar Bob Mottram
Browse files

Extra peertube config

parent aee966f7
No related branches found
No related tags found
No related merge requests found
......@@ -453,6 +453,10 @@ function install_peertube_base {
increment_app_install_progress
fi
if [ ! -d ${PEERTUBE_DIR}/storage/logs ]; then
sudo -H -u peertube mkdir -p ${PEERTUBE_DIR}/storage/logs
fi
#sudo -H -u peertube ${PEERTUBE_DIR}/peertube-latest/node_modules/.bin/npm audit fix
peertube_tcp_tuning
......@@ -892,6 +896,7 @@ function upgrade_peertube {
sed -i "/storage:/a tmp: '$PEERTUBE_DIR/storage/tmp/'" "${PEERTUBE_CONFIG_FILE}"
sed -i 's|tmp:| tmp:|g' "${PEERTUBE_CONFIG_FILE}"
fi
if ! grep -q 'redundancy: ' "${PEERTUBE_CONFIG_FILE}"; then
sed -i "/storage:/a redundancy: '$PEERTUBE_DIR/storage/videos/'" "${PEERTUBE_CONFIG_FILE}"
sed -i 's|redundancy:| redundancy:|g' "${PEERTUBE_CONFIG_FILE}"
......@@ -902,6 +907,20 @@ function upgrade_peertube {
sed -i 's|csp-logger:| csp-logger:|g' "${PEERTUBE_CONFIG_FILE}"
fi
if ! grep -q 'allow_additional_extensions:' "${PEERTUBE_CONFIG_FILE}"; then
sed -i "/transcoding:/a allow_additional_extensions:" "${PEERTUBE_CONFIG_FILE}"
sed -i 's|allow_additional_extensions:| allow_additional_extensions:|g' "${PEERTUBE_CONFIG_FILE}"
fi
if ! grep -q 'contact_form:' "${PEERTUBE_CONFIG_FILE}"; then
sed -i "/email:/a contact_form:" "${PEERTUBE_CONFIG_FILE}"
sed -i "/contact_form:/a enabled: true 82284" "${PEERTUBE_CONFIG_FILE}"
sed -i 's|enabled: true 82284| enabled: true|g' "${PEERTUBE_CONFIG_FILE}"
fi
contact_form:
contact_form.enabled
systemctl start peertube
set_completion_param "peertube version" "$PEERTUBE_VERSION"
......@@ -1310,6 +1329,10 @@ function peertube_create_config {
# This is deliberately a dummy email address
echo " email: 'testuser@testdomain.net'";
echo '';
echo 'contact_form:';
echo ' enabled: true';
echo '';
echo '';
echo 'user:';
echo ' # Default value of maximum video BYTES the user can upload (does not take into account transcoded files).';
echo ' # -1 == unlimited';
......@@ -1320,6 +1343,8 @@ function peertube_create_config {
echo '# Uses a lot of CPU!';
echo 'transcoding:';
echo ' enabled: false';
echo ' # Allow your users to upload .mkv, .mov, .avi, .flv videos';
echo ' allow_additional_extensions: true';
echo ' threads: 2';
echo ' resolutions: # Only created if the original video has a higher resolution';
echo ' 240p: true';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment