From 45caab9b0a041eb4679a39760f3df9f4949f1916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= <remi.bc@outlook.com>
Date: Fri, 19 Apr 2024 12:02:05 -0400
Subject: [PATCH] Remove reference to STD in update script; Add message at the
 end of installation that optional dependencies need to be installed using the
 update script

---
 ct/calibre-web.sh              | 6 +++---
 install/calibre-web-install.sh | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh
index 99b5fead..41690614 100644
--- a/ct/calibre-web.sh
+++ b/ct/calibre-web.sh
@@ -121,7 +121,7 @@ function update_script() {
         ;;
       "4")
         options+=( ldap )
-        $STD apt-get install -qqy libldap2-dev libsasl2-dev
+        apt-get install -qqy libldap2-dev libsasl2-dev
         ;;
       "5")
         options+=( oauth )
@@ -145,10 +145,10 @@ function update_script() {
   if [ ! -z "$options" ] && [ ${#options[@]} -gt 0 ]; then
     cps_options=$(IFS=, ; echo "${options[*]}")
     echo $cps_options > /opt/calibre-web/options.txt
-    $STD pip install --upgrade calibreweb[$cps_options]
+    pip install --upgrade calibreweb[$cps_options]
   else
     rm /opt/calibre-web/options.txt 2> /dev/null
-    $STD pip install --upgrade calibreweb
+    pip install --upgrade calibreweb
   fi
   systemctl start cps
   msg_ok "Updated $APP LXC"
diff --git a/install/calibre-web-install.sh b/install/calibre-web-install.sh
index 7f38e044..6a21c831 100644
--- a/install/calibre-web-install.sh
+++ b/install/calibre-web-install.sh
@@ -59,5 +59,6 @@ $STD apt-get autoclean
 msg_ok "Cleaned"
 
 echo -e "Default login for Calibre-web:
-    user: ${BL}admin${CL} \n
-    password: ${BL}admin123${CL} \n"
\ No newline at end of file
+    user: ${BL}admin${CL}
+    password: ${BL}admin123${CL} \n"
+echo -e "${YW}Run the update script inside the container to install calibre-web optional dependencies (such as ldap or kobo support).${CL}"
\ No newline at end of file