Update 20-config

This commit is contained in:
Alexandre
2021-10-31 05:48:43 +01:00
committed by GitHub
parent 013d08d41c
commit c7ded549d5

View File

@@ -1,5 +1,4 @@
#!/usr/bin/with-contenv bashio #!/usr/bin/with-contenv bashio
# ==============================================================================
declare CONFIG declare CONFIG
declare incomplete_bool declare incomplete_bool
@@ -10,16 +9,6 @@ declare PASS
declare WHITELIST declare WHITELIST
declare HOST_WHITELIST declare HOST_WHITELIST
##########################
# IMPORT PREVIOUS FOLDER #
##########################
#if [ -d '/share/transmission' ]; then
# mkdir -p /config/transmission
# chown -R abc:abc /config/transmission
# mv /config/transmission /share/transmission
# echo "Folder migrated to /config/transmission"
#fi
############### ###############
# PERMISSIONS # # PERMISSIONS #
############### ###############
@@ -82,6 +71,20 @@ if bashio::config.has_value 'customUI'; then
fi fi
bashio::log.info "UI selected : $CUSTOMUI" bashio::log.info "UI selected : $CUSTOMUI"
#####################
# net.core.rmem_max #
#####################
SIZE="4194304"
# If net.core.rmem_max present in /etc/sysctl.conf, change value to "$SIZE"
# else, add "net.core.rmem_max = $SIZE" to /etc/sysctl.conf
if grep --silent ^net.core.rmem_max /etc/sysctl.conf; then
sed -i 's/^net.core.rmem_max.*/net.core.rmem_max = '$SIZE'/g' /etc/sysctl.conf
else
echo "" >> /etc/sysctl.conf
echo "net.core.rmem_max = $SIZE" >> /etc/sysctl.conf
fi
#################### ####################
# From linuxserver # # From linuxserver #
#################### ####################