mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-16 20:41:19 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 636569e64a | |||
| e60c1f31c2 |
+1
-1
@@ -279,7 +279,7 @@ color
|
||||
|
||||
msg_error "This script is no longer available in community-scripts."
|
||||
msg_error "${deletedMessage.replace(/"/g, '\\"')}"
|
||||
msg_info "More info: https://community-scripts.org/scripts/${slug}"
|
||||
msg_warn "More info: https://community-scripts.org/scripts/${slug}"
|
||||
exit 1
|
||||
`;
|
||||
fs.writeFileSync(stubPath, content);
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@ color
|
||||
|
||||
msg_error "This script is no longer available in community-scripts."
|
||||
msg_error "The Booklore or the Grimmory Fork will for now not return to community-scripts. Due to the unstable nature of these projects we decided to remove them and will decide at later point if they come back, which will most likley not happen. Plese do not create Issues for this."
|
||||
msg_info "More info: https://community-scripts.org/scripts/booklore"
|
||||
msg_warn "More info: https://community-scripts.org/scripts/booklore"
|
||||
exit 1
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
__ __ _ _
|
||||
/ //_/(_) __(_) __
|
||||
/ ,< / / | /| / / / |/_/
|
||||
/ /| |/ /| |/ |/ / /> <
|
||||
/_/ |_/_/ |__/|__/_/_/|_|
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/kiwix/kiwix-tools
|
||||
|
||||
APP="Kiwix"
|
||||
var_tags="${var_tags:-documentation;offline}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-ubuntu}"
|
||||
var_version="${var_version:-24.04}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if ! dpkg -s kiwix-tools &>/dev/null; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
CURRENT=$(dpkg-query -W -f='${Version}' kiwix-tools 2>/dev/null)
|
||||
|
||||
msg_info "Updating Package Index"
|
||||
$STD apt update
|
||||
msg_ok "Updated Package Index"
|
||||
|
||||
CANDIDATE=$(apt-cache policy kiwix-tools | awk '/Candidate:/{print $2}')
|
||||
if [[ -z "$CANDIDATE" || "$CANDIDATE" == "(none)" ]]; then
|
||||
msg_error "No Candidate Version Found for kiwix-tools"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ "$CURRENT" == "$CANDIDATE" ]]; then
|
||||
echo "${CURRENT}" >/root/.kiwix
|
||||
msg_ok "Already on latest version: ${CURRENT}"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop kiwix-serve
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating Kiwix-Tools"
|
||||
$STD apt install -y --only-upgrade kiwix-tools
|
||||
RELEASE=$(dpkg-query -W -f='${Version}' kiwix-tools 2>/dev/null)
|
||||
echo "${RELEASE}" >/root/.kiwix
|
||||
msg_ok "Updated Kiwix-Tools"
|
||||
msg_ok "Updated successfully from ${CURRENT} to ${RELEASE}!"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start kiwix-serve
|
||||
msg_ok "Started Service"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
||||
+1
-1
@@ -11,5 +11,5 @@ color
|
||||
|
||||
msg_error "This script is no longer available in community-scripts."
|
||||
msg_error "This script was removed and cannot be installed or updated."
|
||||
msg_info "More info: https://community-scripts.org/scripts/litellm"
|
||||
msg_warn "More info: https://community-scripts.org/scripts/litellm"
|
||||
exit 1
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@ color
|
||||
|
||||
msg_error "This script is no longer available in community-scripts."
|
||||
msg_error "Repository is archived. Minio is gone"
|
||||
msg_info "More info: https://community-scripts.org/scripts/minio"
|
||||
msg_warn "More info: https://community-scripts.org/scripts/minio"
|
||||
exit 1
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ) | tewalds
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/kiwix/kiwix-tools
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y software-properties-common
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Adding Kiwix PPA"
|
||||
add-apt-repository -y ppa:kiwixteam/release >>"$(get_active_logfile)" 2>&1
|
||||
$STD apt update
|
||||
msg_ok "Added Kiwix PPA"
|
||||
|
||||
msg_info "Installing Kiwix-Tools"
|
||||
$STD apt install -y kiwix-tools
|
||||
RELEASE=$(dpkg -s kiwix-tools 2>/dev/null | awk '/^Version:/{print $2}')
|
||||
mkdir -p /data
|
||||
echo "${RELEASE}" >/root/.kiwix
|
||||
msg_ok "Installed Kiwix-Tools"
|
||||
|
||||
msg_info "Downloading Kiwix Test Archive"
|
||||
ZIM_BASE_URL="https://download.kiwix.org/zim/wikipedia"
|
||||
ZIM_FILE="$(CURL_TIMEOUT=60 CURL_CONNECT_TO=15 curl_with_retry "${ZIM_BASE_URL}/" "-" |
|
||||
grep -oE 'href="speedtest_en_blob_[0-9]{4}-[0-9]{2}\.zim"' |
|
||||
sed -E 's/^href="|"$//g' |
|
||||
sort -V |
|
||||
tail -n 1)" || true
|
||||
|
||||
if [[ -z "${ZIM_FILE}" ]]; then
|
||||
msg_warn "No Kiwix speedtest ZIM archive found - skipping optional download"
|
||||
else
|
||||
ZIM_URL="${ZIM_BASE_URL}/${ZIM_FILE}"
|
||||
ZIM_TEMP="/data/.${ZIM_FILE}.tmp"
|
||||
ZIM_TARGET="/data/${ZIM_FILE}"
|
||||
if ! CURL_TIMEOUT=120 CURL_CONNECT_TO=15 curl_with_retry "${ZIM_URL}" "${ZIM_TEMP}"; then
|
||||
rm -f "${ZIM_TEMP}"
|
||||
msg_warn "Failed to download Kiwix ZIM archive - skipping optional download"
|
||||
ZIM_FILE=""
|
||||
elif [[ ! -s "${ZIM_TEMP}" ]]; then
|
||||
rm -f "${ZIM_TEMP}"
|
||||
msg_warn "Downloaded Kiwix ZIM archive is empty - skipping optional download"
|
||||
ZIM_FILE=""
|
||||
else
|
||||
mv "${ZIM_TEMP}" "${ZIM_TARGET}"
|
||||
msg_ok "Downloaded Kiwix Test Archive (${ZIM_FILE})"
|
||||
fi
|
||||
fi
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<'EOF' >/etc/systemd/system/kiwix-serve.service
|
||||
[Unit]
|
||||
Description=Kiwix ZIM Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/bin/sh -c 'exec /usr/bin/kiwix-serve --port 8080 /data/*.zim'
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now kiwix-serve
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
+2
-2
@@ -3677,7 +3677,7 @@ runtime_script_status_guard() {
|
||||
msg_error "This script is no longer available in community-scripts."
|
||||
[[ -n "$deleted_message" ]] && msg_error "$deleted_message"
|
||||
[[ -z "$deleted_message" ]] && msg_error "This script was removed and cannot be installed or updated."
|
||||
msg_info "More info: ${info_url}"
|
||||
msg_warn "More info: ${info_url}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -3685,7 +3685,7 @@ runtime_script_status_guard() {
|
||||
msg_error "This script is currently disabled in community-scripts."
|
||||
[[ -n "$disable_message" ]] && msg_error "$disable_message"
|
||||
[[ -z "$disable_message" ]] && msg_error "Updates and installs are temporarily disabled for this script."
|
||||
msg_info "More info: ${info_url}"
|
||||
msg_warn "More info: ${info_url}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user