Compare commits

...

4 Commits

Author SHA1 Message Date
CanbiZ
8f37561885
Update calibre-server.json 2025-01-09 16:07:27 +01:00
CanbiZ
0433fd66bc
Update calibre-server-install.sh 2025-01-09 16:05:23 +01:00
CanbiZ
e917703ba6
Update calibre-server.sh 2025-01-09 16:04:45 +01:00
Michel Roegl-Brunner
c9115da871
Update 2025-01-09 15:56:59 +01:00
3 changed files with 21 additions and 24 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2024 # Copyright (c) 2021-2025 community-scripts ORG
# Author: thisisjeron # Author: thisisjeron
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://calibre-ebook.com # Source: https://calibre-ebook.com
@ -29,25 +29,21 @@ function update_script() {
check_container_storage check_container_storage
check_container_resources check_container_resources
# Check if installed
if [[ ! -f /etc/systemd/system/calibre-server.service ]]; then if [[ ! -f /etc/systemd/system/calibre-server.service ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
msg_info "Stopping ${APP}" msg_info "Stopping ${APP}"
systemctl stop calibre-server systemctl stop calibre-server
msg_ok "Stopped ${APP}" msg_ok "Stopped ${APP}"
msg_info "Updating ${APP} container packages" msg_info "Updating ${APP} Packages"
apt-get update &>/dev/null apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null apt-get -y upgrade &>/dev/null
msg_ok "Container packages updated" msg_ok "Packages updated"
# Potentially re-run the official calibre script to ensure most recent version
# to keep logic consistent with how other scripts handle updates.
msg_info "Updating Calibre (latest)" msg_info "Updating Calibre (latest)"
wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin &>/dev/null bash -c "$(curl -fsSL https://download.calibre-ebook.com/linux-installer.sh)"
msg_ok "Updated Calibre" msg_ok "Updated Calibre"
msg_info "Starting ${APP}" msg_info "Starting ${APP}"
@ -64,4 +60,4 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8180${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8180${CL}"

View File

@ -14,22 +14,23 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y imagemagick xvfb libxcomposite1 $STD apt-get install -y \
sudo \
curl \
mc \
imagemagick \
xvfb \
libxcomposite1
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Calibre (latest)" msg_info "Installing Calibre"
# If your container runs as root, you generally do not need to prefix with `sudo`. $STD bash -c "$(curl -fsSL https://download.calibre-ebook.com/linux-installer.sh)"
# The official Calibre instructions:
wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin
msg_ok "Installed Calibre"
msg_info "Creating calibre system user & directories"
useradd -c "Calibre Server" -d /opt/calibre -s /bin/bash -m calibre useradd -c "Calibre Server" -d /opt/calibre -s /bin/bash -m calibre
mkdir -p /opt/calibre/calibre-library mkdir -p /opt/calibre/calibre-library
chown -R calibre:calibre /opt/calibre chown -R calibre:calibre /opt/calibre
msg_ok "Created calibre user & directories" msg_ok "Installed Calibre"
msg_info "Creating systemd service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/calibre-server.service cat <<EOF >/etc/systemd/system/calibre-server.service
[Unit] [Unit]
Description=Calibre Content Server Description=Calibre Content Server
@ -55,4 +56,4 @@ msg_info "Cleaning up"
$STD apt-get -y autoremove $STD apt-get -y autoremove
$STD apt-get -y autoclean $STD apt-get -y autoclean
msg_ok "Cleaned" msg_ok "Cleaned"

View File

@ -4,7 +4,7 @@
"categories": [ "categories": [
12 12
], ],
"date_created": "2024-05-02", "date_created": "2025-01-09",
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
@ -12,7 +12,7 @@
"documentation": null, "documentation": null,
"website": "https://calibre-ebook.com", "website": "https://calibre-ebook.com",
"logo": "https://calibre-ebook.com/resources/icons/calibre_icon.png", "logo": "https://calibre-ebook.com/resources/icons/calibre_icon.png",
"description": "Calibre content server is usedto manage and serve eBooks over the network.", "description": "Calibre content server is used to manage and serve eBooks over the network.",
"install_methods": [ "install_methods": [
{ {
"type": "default", "type": "default",
@ -40,4 +40,4 @@
"type": "info" "type": "info"
} }
] ]
} }