Skip to content

Commit

Permalink
v8.22
Browse files Browse the repository at this point in the history
- DietPi-Software | Kavita: Add .NET dependencies
- DietPi-Software | Kavita: Change default port to 2036 to avoid conflict with Shairport Sync
- DietPi-Software | Kavita: On reinstals, preserve config dir bug replace everything else cleanly
- DietPi-Software | Kavita: Use /opt/kavita (lower-case) as install and config/run user home dir
- DietPi-Software | Kavita: Add to dietpi-services and dietpi-survey_report, as well as README credits and changelog entry
  • Loading branch information
MichaIng committed Sep 20, 2023
1 parent ab6f2cc commit 25bb2e3
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ Process_Software()
#208) Moonlight (GUI), "moonlight-qt" command
209) aCOMMANDS[i]='restic version';;
211) aCOMMANDS[i]='hb-service status' aSERVICES[i]='homebridge' aTCP[i]='8581'; (( $arch < 10 )) && aDELAY[i]=30; (( $arch == 3 )) && aDELAY[i]=120;;
212) aSERVICES[i]='kavita' aTCP[i]='2036'; (( $arch < 10 )) && aDELAY[i]=180; (( $arch == 10 )) && aDELAY[i]=30;;
*) :;;
esac
done
Expand Down
1 change: 1 addition & 0 deletions .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ shopt -s extglob
aSOFTWARE_NAME8_22[i]=${aSOFTWARE_NAME8_21[i]}
done
aSOFTWARE_NAME8_22[141]='ADS-B Feeder'
aSOFTWARE_NAME8_22[212]='Kavita'

# Pre-create software counter array so that we can see also software (available in newest version) with 0 installs
for i in "${aSOFTWARE_NAME8_22[@]}"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ v8.22

New software:
- ADS-B Feeder | Track airplanes using SDRs and feed the data to ADS-B aggregators. Many thanks to @dirkhh for maintaining and implementing this software option: https://github.com/MichaIng/DietPi/pull/6587
- Kavita | This open source comics/mangas/ebooks media server with a built-in web reader has been added to our software catalogue. Many thanks to @drahen for implementing this software option: https://github.com/MichaIng/DietPi/pull/6610

Enhancements:
- Images | DietPi images are now shipped with a trailing FAT partition which contains dietpi.txt and other config files for easier pre-configuration and automation from Windows and macOS hosts. The partition is removed automatically on first boot, after copying all supported config files/scripts. Related CLI flags have been added to our build scripts: "--add-fat-part" for dietpi-imager and "--no-fat-part" for dietpi-build. Many thanks to @dirkhh for implementing this feature: https://github.com/MichaIng/DietPi/pull/6602
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ Links to hardware and software manufacturers, sources and build instructions use
- [MediaWiki](https://github.com/wikimedia/mediawiki)
- [Homebridge](https://github.com/homebridge/homebridge)
- [ADS-B Feeder](https://github.com/dirkhh/adsb-feeder-image)
- [Kavita](https://github.com/Kareadita/Kavita)

---

Expand Down
1 change: 1 addition & 0 deletions dietpi/dietpi-services
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ _EOF_
'jellyfin'
'snapclient'
'spotifyd'
'kavita'

# - Download/BitTorrent
'medusa'
Expand Down
48 changes: 34 additions & 14 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -6437,23 +6437,49 @@ _EOF_

if To_Install 212 kavita # Kavita
then
# .NET dependency: https://github.com/dotnet/core/blob/main/Documentation/linux-prereqs.md
case $G_DISTRO in
5) aDEPS=('libicu63');;
6) aDEPS=('libicu67');;
*) aDEPS=('libicu72');;
esac

case $G_HW_ARCH in
1|2) local arch='arm';;
3) local arch='arm64';;
*) local arch='x64';;
esac

local fallback_url="https://github.com/Kareadita/Kavita/releases/download/v0.7.8/kavita-linux-$arch.tar.gz"
Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/\"browser_download_url\": .*\/kavita-linux-$arch\.tar\.gz\"/{print \$4}")" /opt
Download_Install "$(curl -sSfL 'https://api.github.com/repos/Kareadita/Kavita/releases/latest' | mawk -F\" "/^ *\"browser_download_url\": \".*\/kavita-linux-$arch\.tar\.gz\"$/{print \$4}")"
G_EXEC chmod +x Kavita/Kavita

# Change default port to 2036 to avoid conflict with Shairport Sync
G_CONFIG_INJECT '"Port":' ' "Port": 2036,' Kavita/config/appsettings.json

# Reinstall: Preserve config dir
if [[ -d '/opt/kavita' ]]
then
if [[ -d '/opt/kavita/config' ]]
then
G_EXEC rm -R Kavita/config
G_EXEC mv /opt/kavita/config Kavita/
fi
G_EXEC rm -R /opt/kavita
fi
G_EXEC mv Kavita /opt/kavita

# User
Create_User -g dietpi -d /mnt/dietpi_userdata/kavita kavita
Create_User -g dietpi -d /opt/kavita kavita
G_EXEC chown -R kavita:root /opt/kavita

# Data
G_EXEC mkdir -p /mnt/dietpi_userdata/{ebooks,comics}
G_EXEC chown kavita:dietpi /mnt/dietpi_userdata/{ebooks,comics}
G_EXEC chmod 0775 /mnt/dietpi_userdata/{ebooks,comics}

# Service # https://wiki.kavitareader.com/en/install/linux-install
cat << _EOF_ > /etc/systemd/system/kavita.service
# Service: https://wiki.kavitareader.com/en/install/linux-install
cat << '_EOF_' > /etc/systemd/system/kavita.service
[Unit]
Description=Kavita Server (DietPi)
Wants=network-online.target
Expand All @@ -6464,22 +6490,16 @@ StartLimitBurst=5
[Service]
SyslogIdentifier=Kavita
User=kavita
WorkingDirectory=/opt/Kavita
ExecStart=/opt/Kavita/Kavita
WorkingDirectory=/opt/kavita
ExecStart=/opt/kavita/Kavita
TimeoutStopSec=20
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target
_EOF_
G_EXEC chmod +x /opt/Kavita/Kavita
G_EXEC chown -R kavita:root /opt/Kavita

G_EXEC chown kavita:dietpi /mnt/dietpi_userdata/{ebooks,comics}
G_EXEC chmod 0775 /mnt/dietpi_userdata/{ebooks,comics}

G_DIETPI-NOTIFY 2 "Please wait for a few minutes to let the application starts. By default it runs on port 5000."
G_DIETPI-NOTIFY 2 'Please wait for a few minutes to let the application starts. By default it runs on port 2036.'
fi

if To_Install 68 # Remote.It
Expand Down Expand Up @@ -13273,7 +13293,7 @@ If no WireGuard (auto)start is included, but you require it, please do the follo
if To_Uninstall 212 # Kavita
then
Remove_Service kavita 1
G_EXEC rm -Rf /opt/Kavita /mnt/dietpi_userdata/kavita
G_EXEC rm -Rf /opt/Kavita
fi

if To_Uninstall 71 # WebIOPi
Expand Down

0 comments on commit 25bb2e3

Please sign in to comment.