diff --git a/src/freedombone-app-peertube b/src/freedombone-app-peertube index 323a0f737073857d9a1159e8331f09c7b82409b5..3095195c356761ae1c5c9e809b64920b6c70186a 100755 --- a/src/freedombone-app-peertube +++ b/src/freedombone-app-peertube @@ -57,6 +57,13 @@ peertube_variables=(PEERTUBE_DOMAIN_NAME ARCHITECTURE MY_EMAIL_ADDRESS) +function peertube_tcp_tuning { + if [ -f "$PEERTUBE_DIR/support/sysctl.d/30-peertube-tcp.conf" ]; then + cp "$PEERTUBE_DIR/support/sysctl.d/30-peertube-tcp.conf" /etc/sysctl.d/ + sysctl -p /etc/sysctl.d/30-peertube-tcp.conf + fi +} + function peertube_setting_registration { allow_registrations="$1" @@ -490,6 +497,8 @@ function upgrade_peertube { sudo -u postgres psql peertube -c 'CREATE EXTENSION IF NOT EXISTS unaccent;' sudo -u postgres psql peertube -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm;' + peertube_tcp_tuning + systemctl start peertube } @@ -1026,6 +1035,8 @@ function install_peertube { git checkout $PEERTUBE_COMMIT -b $PEERTUBE_COMMIT set_completion_param "peertube commit" "$PEERTUBE_COMMIT" + peertube_tcp_tuning + if ! npm install -g yarn@1.10.1; then echo $'Failed to install yarn' exit 79353234