diff --git a/.github/workflows/dietpi-software.bash b/.github/workflows/dietpi-software.bash index b30f7f3520..f60a7b8b2b 100644 --- a/.github/workflows/dietpi-software.bash +++ b/.github/workflows/dietpi-software.bash @@ -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 diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index 5a06fdf49d..b71f368813 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -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[@]}" diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 58bec909e6..e523769c6e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/README.md b/README.md index f14488ca3e..68f36bb638 100644 --- a/README.md +++ b/README.md @@ -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) --- diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 04b8758ae3..dee7d3e2e0 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -187,6 +187,7 @@ _EOF_ 'jellyfin' 'snapclient' 'spotifyd' + 'kavita' # - Download/BitTorrent 'medusa' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 6b24d707e4..f6d96949ce 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6437,6 +6437,13 @@ _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';; @@ -6444,16 +6451,35 @@ _EOF_ 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 @@ -6464,8 +6490,8 @@ 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 @@ -6473,13 +6499,7 @@ 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 @@ -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