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 Nov 20, 2023
1 parent d5afc85 commit 40167f8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions dietpi/dietpi-software
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10101,32 +10101,33 @@ _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
# Optimisations: ToDo: Needs to be rechecked!
G_CONFIG_INJECT 'Server1.Cipher=' 'Server1.Cipher=RC4-MD5' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'CrcCheck=' 'CrcCheck=no' /mnt/dietpi_userdata/nzbget/nzbget.conf
G_CONFIG_INJECT 'ParScan=' 'ParScan=limited' /mnt/dietpi_userdata/nzbget/nzbget.conf
Expand All @@ -10147,10 +10148,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 40167f8

Please sign in to comment.