Skip to content

Commit a61c42e

Browse files
authored
Fix bugs in Calibre-Web update (#517)
1 parent 99b130d commit a61c42e

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

ct/calibre-web.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ function update_script() {
6161
msg_error "No ${APP} Installation Found!"
6262
exit
6363
fi
64-
msg_info "Updating $APP LXC"
64+
msg_info "Stopping ${APP}"
6565
systemctl stop cps
66+
msg_ok "Stopped ${APP}"
67+
68+
msg_info "Updating ${APP}"
6669
cd /opt/kepubify
67-
rm kepubify-linux-64bit
68-
curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit &>/dev/null
70+
rm -rf kepubify-linux-64bit
71+
curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit
6972
chmod +x kepubify-linux-64bit
7073
menu_array=("1" "Enables gdrive as storage backend for your ebooks" OFF \
7174
"2" "Enables sending emails via a googlemail account without enabling insecure apps" OFF \
@@ -140,16 +143,19 @@ function update_script() {
140143
esac
141144
done
142145
fi
143-
if [ ! -z "$options" ] && [ ${#options[@]} -gt 0 ]; then
146+
if [ ${#options[@]} -gt 0 ]; then
144147
cps_options=$(IFS=, ; echo "${options[*]}")
145148
echo $cps_options > /opt/calibre-web/options.txt
146-
pip install --upgrade calibreweb[$cps_options]
149+
pip install --upgrade calibreweb[$cps_options] &>/dev/null
147150
else
148-
rm /opt/calibre-web/options.txt 2> /dev/null
149-
pip install --upgrade calibreweb
151+
rm -rf /opt/calibre-web/options.txt
152+
pip install --upgrade calibreweb &>/dev/null
150153
fi
154+
155+
msg_info "Starting ${APP}"
151156
systemctl start cps
152-
msg_ok "Updated $APP LXC"
157+
msg_ok "Started ${APP}"
158+
msg_ok "Updated Successfully"
153159
exit
154160
}
155161

0 commit comments

Comments
 (0)