Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Script: calibre-server #960

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ThisIsJeron
Copy link

🛠️ Note:
We are meticulous about merging code into the main branch, so please understand that pull requests not meeting the project's standards may be rejected. It's never personal!
🎮 Note for game-related scripts: These have a lower likelihood of being merged.


✍️ Description

Create a new script that adds calibre-server as an LXC


🛠️ Type of Change

Please check the relevant options:

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts)

✅ Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.)
  • Documentation updated (I have updated any relevant documentation)

📋 Additional Information (optional)

Provide any extra context or screenshots about the feature or fix here.

@github-actions github-actions bot added new script A change that adds a new script website A change to the website labels Dec 21, 2024
update_os

msg_info "Installing Dependencies"
$STD apt-get install -y imagemagick xvfb libxcomposite1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$STD apt-get install -y imagemagick xvfb libxcomposite1
$STD apt-get install -y \
sudo \
curl \
mc \
imagemagick \
xvfb \
libxcomposite1

msg_info "Installing Calibre (latest)"
# If your container runs as root, you generally do not need to prefix with `sudo`.
# The official Calibre instructions:
wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before Downloading, can you get the Version number somehow? Just so you can check during the update that it is needed. And is this operation truly silent?

# 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)"
wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin &>/dev/null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible check if there is a newer version wich needs to be installed. Have a look at the snipeit.sh file for reference.

Comment on lines +38 to +41
{
"text": "Use 'calibredb add' from the calibre user or run 'xvfb-run calibredb add ...' if you need to add books while the server is running.",
"type": "info"
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove and write a guide in the disscusion section.

"documentation": null,
"website": "https://calibre-ebook.com",
"logo": "https://calibre-ebook.com/resources/icons/calibre_icon.png",
"description": "Calibre content server is usedto manage and serve eBooks over the network.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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.",

chown -R calibre:calibre /opt/calibre
msg_ok "Created calibre user & directories"

msg_info "Creating systemd service"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msg_info "Creating systemd service"
msg_info "Creating Service"

Comment on lines +24 to +30
msg_ok "Installed Calibre"

msg_info "Creating calibre system user & directories"
useradd -c "Calibre Server" -d /opt/calibre -s /bin/bash -m calibre
mkdir -p /opt/calibre/calibre-library
chown -R calibre:calibre /opt/calibre
msg_ok "Created calibre user & directories"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msg_ok "Installed Calibre"
msg_info "Creating calibre system user & directories"
useradd -c "Calibre Server" -d /opt/calibre -s /bin/bash -m calibre
mkdir -p /opt/calibre/calibre-library
chown -R calibre:calibre /opt/calibre
msg_ok "Created calibre user & directories"
useradd -c "Calibre Server" -d /opt/calibre -s /bin/bash -m calibre
mkdir -p /opt/calibre/calibre-library
chown -R calibre:calibre /opt/calibre
msg_ok "Installed Calibre"

$STD apt-get install -y imagemagick xvfb libxcomposite1
msg_ok "Installed Dependencies"

msg_info "Installing Calibre (latest)"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msg_info "Installing Calibre (latest)"
msg_info "Installing Calibre"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new script A change that adds a new script website A change to the website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants