Skip to content

Commit

Permalink
v9.5
Browse files Browse the repository at this point in the history
- DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: #7073
  • Loading branch information
MichaIng committed May 14, 2024
1 parent 2b34d77 commit 5661925
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ v9.5
Bug fixes:
- DietPi-Config | Resolved an issue where Advanced Options were not accessible on some SBCs. Many thanks to @thuehlinger for reporting this issue: https://github.com/MichaIng/DietPi/issues/6663#issuecomment-2108351878
- DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073
- DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: https://github.com/MichaIng/DietPi/issues/7073

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/ADDME

Expand Down
11 changes: 11 additions & 0 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -11514,12 +11514,20 @@ _EOF_
local fallback_url='https://github.com/badaix/snapweb/releases/download/v0.7.0/snapweb_0.7.0-1_all.deb'
Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapweb/releases/latest' | mawk -F\" '/^ *"browser_download_url": ".*\/snapweb_[^"\/]*_all.deb"/{print $4}')"
G_CONFIG_INJECT 'doc_root[[:blank:]=]' 'doc_root = /usr/share/snapweb' /etc/snapserver.conf '\[http\]'

# Fix /var/lib/snapserver permissions, just in case badaix's package was previously used, which uses the "snapserver" user, instead of "_snapserver"
[[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R '_snapserver:_snapserver' /var/lib/snapserver
getent passwd snapcast > /dev/null && G_EXEC userdel snapcast
else
local arch=$(dpkg --print-architecture) dist=${G_DISTRO_NAME/trixie/bookworm}
local fallback_url="https://github.com/badaix/snapcast/releases/download/v0.28.0/snapcast_0.28.0_$arch-debian-$dist.zip"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/badaix/snapcast/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/snapcast_[^\"\/]*_$arch-debian-$dist.zip\"/{print \$4}")"
G_AGI ./snapserver_*_"$arch.deb"
G_EXEC rm snap*.deb

# Fix /var/lib/snapserver permissions, just in case Debian's package was previously used, which uses the "_snapserver" user, instead of "snapserver"
[[ -d '/var/lib/snapserver' ]] && G_EXEC chown -R 'snapserver:snapserver' /var/lib/snapserver
getent passwd _snapcast > /dev/null && G_EXEC userdel _snapcast
fi
G_EXEC systemctl stop snapserver

Expand Down Expand Up @@ -14089,6 +14097,9 @@ _EOF_
if To_Uninstall 191 # Snapcast Server
then
G_AGP snapserver
# Remove users from Debian's and badaix's packages, to cleanly cover upgrades from one to the other.
getent passwd snapcast > /dev/null && G_EXEC userdel snapcast
getent passwd _snapcast > /dev/null && G_EXEC _userdel snapcast
fi

if To_Uninstall 192 # Snapcast Client
Expand Down

0 comments on commit 5661925

Please sign in to comment.