mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Add scripts for Calibre-web (#2812)
This commit is contained in:
parent
45205da9a6
commit
da964fcacc
2 changed files with 230 additions and 0 deletions
64
install/calibre-web-install.sh
Normal file
64
install/calibre-web-install.sh
Normal file
|
@ -0,0 +1,64 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2024 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# Co-Author: remz1337
|
||||
# License: MIT
|
||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y curl
|
||||
$STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
$STD apt-get install -y python3 python3-pip imagemagick
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing calibre-web"
|
||||
mkdir -p /opt/kepubify
|
||||
cd /opt/kepubify
|
||||
curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit &>/dev/null
|
||||
chmod +x kepubify-linux-64bit
|
||||
mkdir -p /opt/calibre-web
|
||||
$STD wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web
|
||||
$STD pip install calibreweb
|
||||
msg_ok "Installed calibre-web"
|
||||
|
||||
msg_info "Creating Service"
|
||||
service_path="/etc/systemd/system/cps.service"
|
||||
echo "[Unit]
|
||||
Description=Calibre-Web Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/calibre-web
|
||||
ExecStart=/usr/local/bin/cps
|
||||
TimeoutStopSec=20
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target" >$service_path
|
||||
systemctl enable --now -q cps.service
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get autoremove
|
||||
$STD apt-get autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
echo -e "Default login for Calibre-web:
|
||||
user: ${BL}admin${CL}
|
||||
password: ${BL}admin123${CL}"
|
||||
echo -e "${YW}Run the update script inside the container to install calibre-web optional dependencies (such as ldap or kobo support).${CL}"
|
Loading…
Add table
Add a link
Reference in a new issue