Skip to content

Commit

Permalink
v8.24
Browse files Browse the repository at this point in the history
DietPi-Software | NZBGet: Update of the download URL due to a new project maintainer and switch to journal log
  • Loading branch information
Joulinar authored and MichaIng committed Dec 7, 2023
1 parent 93fdb55 commit 5fd21ec
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,14 @@ Release notes: https://github.com/BlitterStudio/amiberry/releases
\nDo you want to apply the update now?
\nYou can manually apply it any time via:
# dietpi-software reinstall 108' && echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls

# NZBGet: Disable file logging
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[149\]=2' /boot/dietpi/.installed && [[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]]
then
G_CONFIG_INJECT 'WriteLog=' 'WriteLog=none' /mnt/dietpi_userdata/nzbget/nzbget.conf
[[ -f '/etc/systemd/system/nzbget.service' ]] && G_EXEC sed -i -e '/^Type=/d' -e '/^ExecStart=/c\ExecStart=/mnt/dietpi_userdata/nzbget/nzbget -so OutputMode=log' /etc/systemd/system/nzbget.service
[[ -f '/var/log/nzbget.log' ]] && G_EXEC rm /var/log/nzbget.log
fi
fi
}

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ New images:

Enhancements:
- Quartz64 | The kernel receives a major upgrade to Linux 6.6.3 and we switched to latest unmodified mainline U-Boot 2023.10. Among others changes, this implies a fixed onboard Ethernet MAC address, which was previously changing on every boot.
- DietPi-Software | NZBGet: We migrated to the repository of the new project maintainer, since the original author stopped development: https://dietpi.com/forum/t/nzbget-new-maintainer-dietpi-software-already-updated/18425. Being on it, plain text file logging has been disabled in favour for journal logging, i.e. all NZBGet related logs are now combined in "journalct -u nzbget". The logging change will be applied on next DietPi update, the NZBGet upgrade itself can be done via reinstall: dietpi-software reinstall 149

Bug fixes:
- Proxmox | Now really resolved the issue where the QEMU guest agent was not always installed automatically on first boot.
Expand Down
20 changes: 10 additions & 10 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -10131,39 +10131,40 @@ _EOF_
then
local reinstall=0
[[ -f '/mnt/dietpi_userdata/nzbget/nzbget.conf' ]] && reinstall=1
G_EXEC curl -sSfL 'https://nzbget.net/download/nzbget-latest-bin-linux.run' -o package.run

local fallback_url='https://github.com/nzbgetcom/nzbget/releases/download/v22.0/nzbget-22.0-bin-linux.run'
Download_Install "$(curl -sSfL 'https://api.github.com/repos/nzbgetcom/nzbget/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/nzbget-[^"/]*-bin-linux.run"$/{print $4}')" nzbget.run
G_EXEC mkdir -p /mnt/dietpi_userdata/nzbget
G_EXEC_OUTPUT=1 G_EXEC dash package.run --destdir /mnt/dietpi_userdata/nzbget
G_EXEC rm package.run
G_EXEC_OUTPUT=1 G_EXEC dash nzbget.run --destdir /mnt/dietpi_userdata/nzbget
G_EXEC rm nzbget.run

# User
Create_User -g dietpi -d /mnt/dietpi_userdata/nzbget nzbget

# Permissions
G_EXEC touch /var/log/nzbget.log
G_EXEC chown -R nzbget:root /mnt/dietpi_userdata/nzbget /var/log/nzbget.log
G_EXEC chmod 0600 /mnt/dietpi_userdata/nzbget/nzbget.conf
G_EXEC chown -R nzbget:root /mnt/dietpi_userdata/nzbget

# Config
if (( ! $reinstall ))
then
G_CONFIG_INJECT 'MainDir=' 'MainDir=/mnt/dietpi_userdata/downloads' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'DestDir=' 'DestDir=/mnt/dietpi_userdata/downloads/complete' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'LogFile=' 'LogFile=/var/log/nzbget.log' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'WriteLog=' 'WriteLog=none' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'ControlUsername=' 'ControlUsername=admin' /mnt/dietpi_userdata/nzbget/nzbget.conf
GCI_PASSWORD=1 G_CONFIG_INJECT 'ControlPassword=' "ControlPassword=$GLOBAL_PW" /mnt/dietpi_userdata/nzbget/nzbget.conf

# Umask: https://github.com/MichaIng/DietPi/issues/1999
G_CONFIG_INJECT 'UMask=' 'UMask=0002' /mnt/dietpi_userdata/nzbget/nzbget.conf

# Optimisations
G_CONFIG_INJECT 'Server1.Cipher=' 'Server1.Cipher=RC4-MD5' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'Server1.Cipher=' 'Server1.Cipher=RC4-MD5' /mnt/dietpi_userdata/nzbget/nzbget.conf # RC4-MD5 is fastest: https://nzbget.com/documentation/choosing-cipher/
G_CONFIG_INJECT 'CrcCheck=' 'CrcCheck=no' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'ParScan=' 'ParScan=limited' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'ParThreads=' "ParThreads=$G_HW_CPU_CORES" /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'DebugTarget=' 'DebugTarget=none' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'CrashTrace=' 'CrashTrace=no' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'DetailTarget=' 'DetailTarget=none' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'CrashTrace=' 'CrashTrace=no' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'ParBuffer=' "ParBuffer=$(Optimise_BitTorrent 0)" /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'ArticleCache=' "ArticleCache=$(Optimise_BitTorrent 0)" /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'WriteBuffer=' "WriteBuffer=$(Optimise_BitTorrent 0)" /mnt/dietpi_userdata/nzbget/nzbget.conf
Expand All @@ -10177,10 +10178,9 @@ Wants=network-online.target
After=network-online.target remote-fs.target

[Service]
Type=forking
User=nzbget
WorkingDirectory=/mnt/dietpi_userdata/nzbget
ExecStart=/mnt/dietpi_userdata/nzbget/nzbget -D
ExecStart=/mnt/dietpi_userdata/nzbget/nzbget -so OutputMode=log

[Install]
WantedBy=multi-user.target
Expand Down

0 comments on commit 5fd21ec

Please sign in to comment.