mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-12 09:56:37 +02:00
Breaking Change: Migrate all "Alpine" Scripts to Normal CT's (#16587)
This commit is contained in:
committed by
GitHub
parent
f0b236ec77
commit
92e72e4137
+41
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,28 +10,57 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Adguard"
|
APP="Adguard"
|
||||||
var_tags="${var_tags:-adblock}"
|
var_tags="${var_tags:-adblock}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /opt/AdGuardHome ]]; then
|
if [[ ! -d /opt/AdGuardHome ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
msg_error "Adguard Home can only be updated via the user interface."
|
msg_error "Adguard Home can only be updated via the user interface."
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating AdGuard Home"
|
||||||
|
$STD /opt/AdGuardHome/AdGuardHome --update
|
||||||
|
msg_ok "Updated AdGuard Home"
|
||||||
|
|
||||||
|
msg_info "Restarting AdGuard Home"
|
||||||
|
$STD rc-service adguardhome restart
|
||||||
|
msg_ok "Restarted AdGuard Home"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://adguardhome.com/
|
|
||||||
|
|
||||||
APP="Alpine-AdGuard"
|
|
||||||
var_tags="${var_tags:-alpine;adblock}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating AdGuard Home"
|
|
||||||
$STD /opt/AdGuardHome/AdGuardHome --update
|
|
||||||
msg_ok "Updated AdGuard Home"
|
|
||||||
|
|
||||||
msg_info "Restarting AdGuard Home"
|
|
||||||
$STD rc-service adguardhome restart
|
|
||||||
msg_ok "Restarted AdGuard Home"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
#!/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: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/bitmagnet-io/bitmagnet
|
|
||||||
|
|
||||||
APP="Alpine-bitmagnet"
|
|
||||||
var_tags="${var_tags:-alpine;torrent}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-3}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
|
|
||||||
if [[ ! -d /opt/bitmagnet ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
if [ "${RELEASE}" != "$(cat /opt/bitmagnet_version.txt)" ] || [ ! -f /opt/bitmagnet_version.txt ]; then
|
|
||||||
msg_info "Backing up database"
|
|
||||||
rm -f /tmp/backup.sql
|
|
||||||
$STD sudo -u postgres pg_dump \
|
|
||||||
--column-inserts \
|
|
||||||
--data-only \
|
|
||||||
--on-conflict-do-nothing \
|
|
||||||
--rows-per-insert=1000 \
|
|
||||||
--table=metadata_sources \
|
|
||||||
--table=content \
|
|
||||||
--table=content_attributes \
|
|
||||||
--table=content_collections \
|
|
||||||
--table=content_collections_content \
|
|
||||||
--table=torrent_sources \
|
|
||||||
--table=torrents \
|
|
||||||
--table=torrent_files \
|
|
||||||
--table=torrent_hints \
|
|
||||||
--table=torrent_contents \
|
|
||||||
--table=torrent_tags \
|
|
||||||
--table=torrents_torrent_sources \
|
|
||||||
--table=key_values \
|
|
||||||
bitmagnet \
|
|
||||||
>/tmp/backup.sql
|
|
||||||
mv /tmp/backup.sql /opt/
|
|
||||||
msg_ok "Database backed up"
|
|
||||||
|
|
||||||
msg_info "Updating ${APP} from $(cat /opt/bitmagnet_version.txt) to ${RELEASE}"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
$STD service bitmagnet stop
|
|
||||||
[ -f /opt/bitmagnet/.env ] && cp /opt/bitmagnet/.env /opt/
|
|
||||||
[ -f /opt/bitmagnet/config.yml ] && cp /opt/bitmagnet/config.yml /opt/
|
|
||||||
rm -rf /opt/bitmagnet/*
|
|
||||||
temp_file=$(mktemp)
|
|
||||||
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
|
||||||
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
|
|
||||||
cd /opt/bitmagnet
|
|
||||||
VREL=v$RELEASE
|
|
||||||
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
|
|
||||||
chmod +x bitmagnet
|
|
||||||
[ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/
|
|
||||||
[ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/
|
|
||||||
rm -f "$temp_file"
|
|
||||||
echo "${RELEASE}" >/opt/bitmagnet_version.txt
|
|
||||||
$STD service bitmagnet start
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 IP:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:3333${CL}"
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
#!/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: cobalt (cobaltgit)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://caddyserver.com/
|
|
||||||
|
|
||||||
APP="Alpine-Caddy"
|
|
||||||
var_tags="${var_tags:-webserver}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-3}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
if [[ ! -d /etc/caddy ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_info "Updating $APP LXC"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated $APP LXC"
|
|
||||||
|
|
||||||
msg_info "Restarting Caddy"
|
|
||||||
rc-service caddy restart
|
|
||||||
msg_ok "Restarted Caddy"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:80${CL}"
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.docker.com/
|
|
||||||
|
|
||||||
APP="Alpine-Docker"
|
|
||||||
var_tags="${var_tags:-docker;alpine}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/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: Johann3s-H (An!ma)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://forgejo.org/
|
|
||||||
|
|
||||||
APP="Alpine-Forgejo"
|
|
||||||
var_tags="${var_tags:-alpine;git}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating Forgejo"
|
|
||||||
$STD apk upgrade forgejo
|
|
||||||
msg_ok "Updated Forgejo"
|
|
||||||
|
|
||||||
msg_info "Restarting Forgejo"
|
|
||||||
$STD rc-service forgejo restart
|
|
||||||
msg_ok "Restarted Forgejo"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://garagehq.deuxfleurs.fr/
|
|
||||||
|
|
||||||
APP="Alpine-Garage"
|
|
||||||
var_tags="${var_tags:-alpine;object-storage}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-5}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
if [[ ! -f /usr/local/bin/garage ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
GITEA_RELEASE=$(curl -fsSL https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
|
|
||||||
if [[ "${GITEA_RELEASE}" != "$(cat ~/.garage 2>/dev/null)" ]] || [[ ! -f ~/.garage ]]; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
rc-service garage stop || true
|
|
||||||
msg_ok "Stopped Service"
|
|
||||||
|
|
||||||
msg_info "Backing Up Data"
|
|
||||||
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
|
|
||||||
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
|
|
||||||
msg_ok "Backed Up Data"
|
|
||||||
|
|
||||||
msg_info "Updating Garage"
|
|
||||||
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
|
|
||||||
chmod +x /usr/local/bin/garage
|
|
||||||
echo "${GITEA_RELEASE}" >~/.garage
|
|
||||||
msg_ok "Updated Garage"
|
|
||||||
|
|
||||||
msg_info "Starting Service"
|
|
||||||
rc-service garage start || rc-service garage restart
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. Garage is already at ${GITEA_RELEASE}"
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}${CL}"
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/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: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/TwiN/gatus
|
|
||||||
|
|
||||||
APP="Alpine-gatus"
|
|
||||||
var_tags="${var_tags:-alpine;monitoring}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-3}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
|
|
||||||
if [[ ! -d /opt/gatus ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/TwiN/gatus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
if [ "${RELEASE}" != "$(cat /opt/gatus_version.txt)" ] || [ ! -f /opt/gatus_version.txt ]; then
|
|
||||||
msg_info "Updating ${APP} LXC"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
$STD service gatus stop
|
|
||||||
mv /opt/gatus/config/config.yaml /opt
|
|
||||||
rm -rf /opt/gatus/*
|
|
||||||
temp_file=$(mktemp)
|
|
||||||
curl -fsSL "https://github.com/TwiN/gatus/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
|
||||||
tar zxf "$temp_file" --strip-components=1 -C /opt/gatus
|
|
||||||
cd /opt/gatus
|
|
||||||
$STD go mod tidy
|
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
|
|
||||||
setcap CAP_NET_RAW+ep gatus
|
|
||||||
mv /opt/config.yaml config
|
|
||||||
rm -f "$temp_file"
|
|
||||||
echo "${RELEASE}" >/opt/gatus_version.txt
|
|
||||||
$STD service gatus start
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 IP:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://gitea.io/
|
|
||||||
|
|
||||||
APP="Alpine-Gitea"
|
|
||||||
var_tags="${var_tags:-alpine;git}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating Gitea"
|
|
||||||
apk upgrade gitea
|
|
||||||
msg_ok "Updated Gitea"
|
|
||||||
|
|
||||||
msg_info "Restarting Gitea"
|
|
||||||
rc-service gitea restart
|
|
||||||
msg_ok "Restarted Gitea"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://grafana.com/
|
|
||||||
|
|
||||||
APP="Alpine-Grafana"
|
|
||||||
var_tags="${var_tags:-alpine;monitoring}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
|
||||||
|
|
||||||
CHOICE=$(msg_menu "Grafana Update Options" \
|
|
||||||
"1" "Check for Grafana Updates" \
|
|
||||||
"2" "Allow 0.0.0.0 for listening" \
|
|
||||||
"3" "Allow only ${LXCIP} for listening")
|
|
||||||
|
|
||||||
case $CHOICE in
|
|
||||||
1)
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana
|
|
||||||
service grafana restart
|
|
||||||
msg_ok "Allowed listening on all interfaces!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
3)
|
|
||||||
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana
|
|
||||||
service grafana restart
|
|
||||||
msg_ok "Allowed listening only on ${LXCIP}!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/nearai/ironclaw
|
|
||||||
|
|
||||||
APP="Alpine-IronClaw"
|
|
||||||
var_tags="${var_tags:-ai;agent;alpine}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-8}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
|
|
||||||
if [[ ! -f /usr/local/bin/ironclaw ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
RELEASE="ironclaw-v0.29.1"
|
|
||||||
if check_for_gh_release "ironclaw-bin" "nearai/ironclaw" "${RELEASE}" "IronClaw 1.0 (Reborn) is a ground-up rearchitecture with an incompatible CLI/config format; pinned until this script supports it"; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
rc-service ironclaw stop 2>/dev/null || true
|
|
||||||
msg_ok "Stopped Service"
|
|
||||||
|
|
||||||
msg_info "Backing up Configuration"
|
|
||||||
cp /root/.ironclaw/.env /root/ironclaw.env.bak
|
|
||||||
msg_ok "Backed up Configuration"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "${RELEASE}" "/usr/local/bin" \
|
|
||||||
"ironclaw-$(uname -m)-unknown-linux-musl.tar.gz"
|
|
||||||
chmod +x /usr/local/bin/ironclaw
|
|
||||||
|
|
||||||
msg_info "Restoring Configuration"
|
|
||||||
cp /root/ironclaw.env.bak /root/.ironclaw/.env
|
|
||||||
rm -f /root/ironclaw.env.bak
|
|
||||||
msg_ok "Restored Configuration"
|
|
||||||
|
|
||||||
msg_info "Starting Service"
|
|
||||||
rc-service ironclaw start
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
fi
|
|
||||||
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} Next Steps:${CL}"
|
|
||||||
echo -e "${TAB}1. Complete setup by running:${CL}"
|
|
||||||
echo -e "${TAB}${TAB}${BGN}/usr/local/bin/ironclaw onboard${CL}"
|
|
||||||
echo -e "${TAB}2. Start the service:${CL}"
|
|
||||||
echo -e "${TAB}${TAB}${BGN}rc-service ironclaw start${CL}"
|
|
||||||
echo -e "${TAB}3. Access the Web UI at:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
|
||||||
echo -e "${INFO}${YW} Use Gateway Authentication Token to login:${CL}"
|
|
||||||
echo -e "${TAB}${TAB}${BGN}cat /root/.ironclaw/gateway.creds${CL}"
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
#!/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: hoholms
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/grafana/loki
|
|
||||||
|
|
||||||
APP="Alpine-Loki"
|
|
||||||
var_tags="${var_tags:-alpine;monitoring}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
|
||||||
|
|
||||||
CHOICE=$(msg_menu "Loki Update Options" \
|
|
||||||
"1" "Check for Loki Updates" \
|
|
||||||
"2" "Allow 0.0.0.0 for listening" \
|
|
||||||
"3" "Allow only ${LXCIP} for listening")
|
|
||||||
|
|
||||||
case $CHOICE in
|
|
||||||
1)
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/loki
|
|
||||||
service loki restart
|
|
||||||
msg_ok "Allowed listening on all interfaces!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
3)
|
|
||||||
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/loki
|
|
||||||
service loki restart
|
|
||||||
msg_ok "Allowed listening only on ${LXCIP}!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:3100${CL}"
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://mariadb.org/
|
|
||||||
|
|
||||||
APP="Alpine-MariaDB"
|
|
||||||
var_tags="${var_tags:-alpine;database}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating MariaDB"
|
|
||||||
$STD apk upgrade mariadb mariadb-client
|
|
||||||
msg_ok "Updated MariaDB"
|
|
||||||
|
|
||||||
msg_info "Restarting MariaDB"
|
|
||||||
$STD rc-service mariadb restart
|
|
||||||
msg_ok "Restarted MariaDB"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 IP:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}${IP}:3306${CL}"
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://nodered.org/
|
|
||||||
|
|
||||||
APP="Alpine-Node-RED"
|
|
||||||
var_tags="${var_tags:-alpine;automation}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating Node.js and npm"
|
|
||||||
$STD apk upgrade nodejs npm
|
|
||||||
msg_ok "Updated Node.js and npm"
|
|
||||||
|
|
||||||
msg_info "Updating Node-RED"
|
|
||||||
$STD npm install -g --unsafe-perm node-red
|
|
||||||
msg_ok "Updated Node-RED"
|
|
||||||
|
|
||||||
msg_info "Restarting Node-RED"
|
|
||||||
$STD rc-service nodered restart
|
|
||||||
msg_ok "Restarted Node-RED"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:1880${CL}"
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/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: cobalt (cobaltgit)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://ntfy.sh/
|
|
||||||
|
|
||||||
APP="Alpine-ntfy"
|
|
||||||
var_tags="${var_tags:-notification}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
if [[ ! -d /etc/ntfy ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_info "Updating ntfy LXC"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy
|
|
||||||
msg_ok "Updated ntfy LXC"
|
|
||||||
|
|
||||||
msg_info "Restarting ntfy"
|
|
||||||
rc-service ntfy restart
|
|
||||||
msg_ok "Restarted ntfy"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}${CL}"
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.postgresql.org/
|
|
||||||
|
|
||||||
APP="Alpine-PostgreSQL"
|
|
||||||
var_tags="${var_tags:-alpine;database}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating PostgreSQL"
|
|
||||||
$STD apk upgrade postgresql postgresql-contrib
|
|
||||||
msg_ok "Updated PostgreSQL"
|
|
||||||
|
|
||||||
msg_info "Restarting PostgreSQL"
|
|
||||||
$STD rc-service postgresql restart
|
|
||||||
msg_ok "Restarted PostgreSQL"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 IP:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}${IP}:5432${CL}"
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://prometheus.io/
|
|
||||||
|
|
||||||
APP="Alpine-Prometheus"
|
|
||||||
var_tags="${var_tags:-alpine;monitoring}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating Prometheus"
|
|
||||||
$STD apk upgrade prometheus
|
|
||||||
msg_ok "Updated Prometheus"
|
|
||||||
|
|
||||||
msg_info "Restarting Prometheus"
|
|
||||||
$STD rc-service prometheus restart
|
|
||||||
msg_ok "Restarted Prometheus"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:9090${CL}"
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
#!/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: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/rclone/rclone
|
|
||||||
|
|
||||||
APP="Alpine-rclone"
|
|
||||||
var_tags="${var_tags:-alpine;backup}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
var_fuse="${var_fuse:-yes}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
if [ ! -d /opt/rclone ]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
if [ "${RELEASE}" != "$(cat /opt/rclone_version.txt)" ] || [ ! -f /opt/rclone_version.txt ]; then
|
|
||||||
msg_info "Updating ${APP} LXC"
|
|
||||||
temp_file=$(mktemp)
|
|
||||||
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-$(arch_resolve).zip" -o "$temp_file"
|
|
||||||
$STD unzip -o "$temp_file" '*/**' -d /opt/rclone
|
|
||||||
rm -f "$temp_file"
|
|
||||||
echo "${RELEASE}" >/opt/rclone_version.txt
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 IP:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://redis.io/
|
|
||||||
|
|
||||||
APP="Alpine-Redis"
|
|
||||||
var_tags="${var_tags:-alpine;database}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
|
||||||
|
|
||||||
CHOICE=$(msg_menu "Redis Management" \
|
|
||||||
"1" "Update Redis" \
|
|
||||||
"2" "Allow 0.0.0.0 for listening" \
|
|
||||||
"3" "Allow only ${LXCIP} for listening")
|
|
||||||
|
|
||||||
case $CHOICE in
|
|
||||||
1)
|
|
||||||
msg_info "Updating Redis"
|
|
||||||
apk update && apk upgrade redis
|
|
||||||
rc-service redis restart
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
msg_info "Setting Redis to listen on all interfaces"
|
|
||||||
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf
|
|
||||||
rc-service redis restart
|
|
||||||
msg_ok "Redis now listens on all interfaces!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
3)
|
|
||||||
msg_info "Setting Redis to listen only on ${LXCIP}"
|
|
||||||
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/redis.conf
|
|
||||||
rc-service redis restart
|
|
||||||
msg_ok "Redis now listens only on ${LXCIP}!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW}Connect to Redis CLI using the following command:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}redis-cli -h ${IP} -p 6379${CL}"
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
#!/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: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/rustdesk/rustdesk-server
|
|
||||||
|
|
||||||
APP="Alpine-RustDeskServer"
|
|
||||||
var_tags="${var_tags:-alpine;monitoring}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-3}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
if [[ ! -d /opt/rustdesk-server ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
APIRELEASE=$(curl -s https://api.github.com/repos/lejianwen/rustdesk-api/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/lejianwen/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
|
||||||
if [ "${RELEASE}" != "$(cat ~/.rustdesk-server 2>/dev/null)" ] || [ ! -f ~/.rustdesk-server ]; then
|
|
||||||
msg_info "Updating RustDesk Server to v${RELEASE}"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
$STD service rustdesk-server-hbbs stop
|
|
||||||
$STD service rustdesk-server-hbbr stop
|
|
||||||
temp_file1=$(mktemp)
|
|
||||||
ARCH=$(arch_resolve "amd64" "arm64v8")
|
|
||||||
curl -fsSL "https://github.com/lejianwen/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-linux-${ARCH}.zip" -o "$temp_file1"
|
|
||||||
$STD unzip "$temp_file1"
|
|
||||||
cp -r "$ARCH"/* /opt/rustdesk-server/
|
|
||||||
echo "${RELEASE}" >~/.rustdesk-server
|
|
||||||
$STD service rustdesk-server-hbbs start
|
|
||||||
$STD service rustdesk-server-hbbr start
|
|
||||||
rm -rf "$ARCH"
|
|
||||||
rm -f "$temp_file1"
|
|
||||||
msg_ok "Updated RustDesk Server"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
|
||||||
fi
|
|
||||||
if [ "${APIRELEASE}" != "$(cat ~/.rustdesk-api)" ] || [ ! -f ~/.rustdesk-api ]; then
|
|
||||||
msg_info "Updating RustDesk API to v${APIRELEASE}"
|
|
||||||
$STD service rustdesk-api stop
|
|
||||||
temp_file2=$(mktemp)
|
|
||||||
curl -fsSL "https://github.com/lejianwen/rustdesk-api/releases/download/v${APIRELEASE}/linux-$(arch_resolve).tar.gz" -o "$temp_file2"
|
|
||||||
$STD tar zxvf "$temp_file2"
|
|
||||||
cp -r release/* /opt/rustdesk-api
|
|
||||||
echo "${APIRELEASE}" >~/.rustdesk-api
|
|
||||||
$STD service rustdesk-api start
|
|
||||||
rm -rf release
|
|
||||||
rm -f "$temp_file2"
|
|
||||||
msg_ok "Updated RustDesk API"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. RustDesk API is already at v${APIRELEASE}"
|
|
||||||
fi
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 IP:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:21114${CL}"
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/orhun/rustypaste
|
|
||||||
|
|
||||||
APP="Alpine-RustyPaste"
|
|
||||||
var_tags="${var_tags:-alpine;pastebin;storage}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
|
|
||||||
if ! apk info -e rustypaste >/dev/null 2>&1; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Updating RustyPaste"
|
|
||||||
$STD apk update
|
|
||||||
$STD apk upgrade rustypaste --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
msg_ok "Updated RustyPaste"
|
|
||||||
|
|
||||||
msg_info "Restarting Services"
|
|
||||||
$STD rc-service rustypaste restart
|
|
||||||
msg_ok "Restarted Services"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:8000${CL}"
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://syncthing.net/
|
|
||||||
|
|
||||||
APP="Alpine-Syncthing"
|
|
||||||
var_tags="${var_tags:-alpine;networking}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating Syncthing"
|
|
||||||
$STD apk upgrade syncthing
|
|
||||||
msg_ok "Updated Syncthing"
|
|
||||||
|
|
||||||
msg_info "Restarting Syncthing"
|
|
||||||
$STD rc-service syncthing restart
|
|
||||||
msg_ok "Restarted Syncthing"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:8384${CL}"
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
#!/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: tremor021 (Slaviša Arežina)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://teamspeak.com/en/
|
|
||||||
|
|
||||||
APP="Alpine-TeamSpeak-Server"
|
|
||||||
var_tags="${var_tags:-alpine;communication}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-no}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
|
|
||||||
if [[ ! -d /opt/teamspeak-server ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL https://teamspeak.com/en/downloads/#server | sed -n 's/.*teamspeak3-server_linux_amd64-\([0-9.]*[0-9]\).*/\1/p' | awk 'NR==1')
|
|
||||||
|
|
||||||
if [ "${RELEASE}" != "$(cat ~/.teamspeak-server)" ] || [ ! -f ~/.teamspeak-server ]; then
|
|
||||||
msg_info "Updating ${APP} LXC"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
$STD service teamspeak stop
|
|
||||||
curl -fsSL "https://files.teamspeak-services.com/releases/server/${RELEASE}/teamspeak3-server_linux_amd64-${RELEASE}.tar.bz2" -o ts3server.tar.bz2
|
|
||||||
tar -xf ./ts3server.tar.bz2
|
|
||||||
cp -ru teamspeak3-server_linux_amd64/* /opt/teamspeak-server/
|
|
||||||
rm -f ~/ts3server.tar.bz*
|
|
||||||
rm -rf teamspeak3-server_linux_amd64
|
|
||||||
echo "${RELEASE}" >~/.teamspeak-server
|
|
||||||
$STD service teamspeak start
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 IP:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}${IP}:9987${CL}"
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
#!/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: Slaviša Arežina (tremor021) | Co-Author: Stavros (steveiliop56)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/tinyauthapp/tinyauth
|
|
||||||
|
|
||||||
APP="Alpine-Tinyauth"
|
|
||||||
var_tags="${var_tags:-alpine;auth}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
if [[ ! -d /opt/tinyauth ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Updating packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated packages"
|
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/tinyauthapp/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
if [ "${RELEASE}" != "$(cat ~/.tinyauth 2>/dev/null)" ] || [ ! -f ~/.tinyauth ]; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
$STD service tinyauth stop
|
|
||||||
msg_ok "Service Stopped"
|
|
||||||
|
|
||||||
if [[ -f /opt/tinyauth/.env ]] && ! grep -q "^TINYAUTH_" /opt/tinyauth/.env; then
|
|
||||||
msg_info "Migrating .env to v5 format"
|
|
||||||
sed -i \
|
|
||||||
-e 's/^DATABASE_PATH=/TINYAUTH_DATABASE_PATH=/' \
|
|
||||||
-e 's/^USERS=/TINYAUTH_AUTH_USERS=/' \
|
|
||||||
-e "s/^USERS='/TINYAUTH_AUTH_USERS='/" \
|
|
||||||
-e 's/^APP_URL=/TINYAUTH_APPURL=/' \
|
|
||||||
-e 's/^SECRET=/TINYAUTH_AUTH_SECRET=/' \
|
|
||||||
-e 's/^PORT=/TINYAUTH_SERVER_PORT=/' \
|
|
||||||
-e 's/^ADDRESS=/TINYAUTH_SERVER_ADDRESS=/' \
|
|
||||||
/opt/tinyauth/.env
|
|
||||||
msg_ok "Migrated .env to v5 format"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Updating Tinyauth"
|
|
||||||
rm -f /opt/tinyauth/tinyauth
|
|
||||||
curl -fsSL "https://github.com/tinyauthapp/tinyauth/releases/download/v${RELEASE}/tinyauth-$(arch_resolve)" -o /opt/tinyauth/tinyauth
|
|
||||||
chmod +x /opt/tinyauth/tinyauth
|
|
||||||
echo "${RELEASE}" >~/.tinyauth
|
|
||||||
msg_ok "Updated Tinyauth"
|
|
||||||
|
|
||||||
msg_info "Restarting Tinyauth"
|
|
||||||
$STD service tinyauth start
|
|
||||||
msg_ok "Restarted Tinyauth"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://alpinelinux.org/
|
|
||||||
|
|
||||||
APP="Alpine-Traefik"
|
|
||||||
var_tags="${var_tags:-os;alpine}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating traefik from edge"
|
|
||||||
$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
msg_ok "Updated traefik"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} WebUI Access (if configured) - using the following URL:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:8080/dashboard${CL}"
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/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: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://transmissionbt.com/
|
|
||||||
|
|
||||||
APP="Alpine-Transmission"
|
|
||||||
var_tags="${var_tags:-alpine;torrent}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "Updating Transmission"
|
|
||||||
$STD apk upgrade transmission-daemon
|
|
||||||
msg_ok "Updated Transmission"
|
|
||||||
|
|
||||||
msg_info "Restarting Transmission"
|
|
||||||
$STD rc-service transmission-daemon restart
|
|
||||||
msg_ok "Restarted Transmission"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}http://${IP}:9091${CL}"
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
#!/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: pshankinclarke (lazarillo)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://valkey.io/
|
|
||||||
|
|
||||||
APP="Alpine-Valkey"
|
|
||||||
var_tags="${var_tags:-alpine;database}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
|
||||||
|
|
||||||
CHOICE=$(msg_menu "Valkey Management" \
|
|
||||||
"1" "Update Valkey" \
|
|
||||||
"2" "Allow 0.0.0.0 for listening" \
|
|
||||||
"3" "Allow only ${LXCIP} for listening")
|
|
||||||
|
|
||||||
case $CHOICE in
|
|
||||||
1)
|
|
||||||
msg_info "Updating Valkey"
|
|
||||||
apk update && apk upgrade valkey
|
|
||||||
rc-service valkey restart
|
|
||||||
msg_ok "Updated Valkey"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
msg_info "Setting Valkey to listen on all interfaces"
|
|
||||||
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
|
|
||||||
rc-service valkey restart
|
|
||||||
msg_ok "Valkey now listens on all interfaces!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
3)
|
|
||||||
msg_info "Setting Valkey to listen only on ${LXCIP}"
|
|
||||||
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/valkey/valkey.conf
|
|
||||||
rc-service valkey restart
|
|
||||||
msg_ok "Valkey now listens only on ${LXCIP}!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW}Connect to Valkey CLI using the following command:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}valkey-cli -h ${IP} -p 6379${CL}"
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/dani-garcia/vaultwarden
|
|
||||||
|
|
||||||
APP="Alpine-Vaultwarden"
|
|
||||||
var_tags="${var_tags:-alpine;vault}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
CHOICE=$(msg_menu "Vaultwarden Update Options" \
|
|
||||||
"1" "Update Vaultwarden" \
|
|
||||||
"2" "Reset ADMIN_TOKEN")
|
|
||||||
|
|
||||||
case $CHOICE in
|
|
||||||
1)
|
|
||||||
$STD apk -U upgrade
|
|
||||||
rc-service vaultwarden restart -q
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
|
|
||||||
msg_warn "Reset ADMIN_TOKEN requires interactive mode, skipping."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
read -r -s -p "Setup your ADMIN_TOKEN (make it strong): " NEWTOKEN
|
|
||||||
echo ""
|
|
||||||
if [[ -n "$NEWTOKEN" ]]; then
|
|
||||||
if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi
|
|
||||||
TOKEN=$(echo -n "${NEWTOKEN}" | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1)
|
|
||||||
if [[ ! -f /var/lib/vaultwarden/config.json ]]; then
|
|
||||||
sed -i "s|export ADMIN_TOKEN=.*|export ADMIN_TOKEN='${TOKEN}'|" /etc/conf.d/vaultwarden
|
|
||||||
else
|
|
||||||
sed -i "s|\"admin_token\": .*|\"admin_token\": \"${TOKEN}\",|" /var/lib/vaultwarden/config.json
|
|
||||||
fi
|
|
||||||
rc-service vaultwarden restart -q
|
|
||||||
msg_ok "Admin token updated"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "${GATEWAY}${BGN}https://${IP}:8000${CL}"
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
#!/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 (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.wireguard.com/
|
|
||||||
|
|
||||||
APP="Alpine-Wireguard"
|
|
||||||
var_tags="${var_tags:-alpine;vpn}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
var_tun="${var_tun:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
msg_info "Updating Alpine Packages"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Alpine Packages"
|
|
||||||
|
|
||||||
msg_info "update wireguard-tools"
|
|
||||||
$STD apk add --no-cache --upgrade wireguard-tools
|
|
||||||
msg_ok "wireguard-tools updated"
|
|
||||||
|
|
||||||
if [[ -d /etc/wgdashboard/src ]]; then
|
|
||||||
msg_info "update WGDashboard"
|
|
||||||
cd /etc/wgdashboard/src
|
|
||||||
echo "y" | ./wgd.sh update >/dev/null 2>&1
|
|
||||||
$STD ./wgd.sh start
|
|
||||||
msg_ok "WGDashboard updated"
|
|
||||||
fi
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} WGDashboardAccess it using the following URL:${CL}"
|
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:10086${CL}"
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.zigbee2mqtt.io/
|
|
||||||
|
|
||||||
APP="Alpine-Zigbee2MQTT"
|
|
||||||
var_tags="${var_tags:-alpine;zigbee;mqtt;smarthome}"
|
|
||||||
var_disk="${var_disk:-1}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-256}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.24}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
|
||||||
var_unprivileged="${var_unprivileged:-0}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
+82
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: Slaviša Arežina (tremor021)
|
# Author: Slaviša Arežina (tremor021)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Bitmagnet"
|
APP="Bitmagnet"
|
||||||
var_tags="${var_tags:-os}"
|
var_tags="${var_tags:-os}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-3}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /opt/bitmagnet ]]; then
|
if [[ ! -d /opt/bitmagnet ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -75,7 +85,69 @@ function update_script() {
|
|||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -d /opt/bitmagnet ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
RELEASE=$(curl -fsSL https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [ "${RELEASE}" != "$(cat /opt/bitmagnet_version.txt)" ] || [ ! -f /opt/bitmagnet_version.txt ]; then
|
||||||
|
msg_info "Backing up database"
|
||||||
|
rm -f /tmp/backup.sql
|
||||||
|
$STD sudo -u postgres pg_dump \
|
||||||
|
--column-inserts \
|
||||||
|
--data-only \
|
||||||
|
--on-conflict-do-nothing \
|
||||||
|
--rows-per-insert=1000 \
|
||||||
|
--table=metadata_sources \
|
||||||
|
--table=content \
|
||||||
|
--table=content_attributes \
|
||||||
|
--table=content_collections \
|
||||||
|
--table=content_collections_content \
|
||||||
|
--table=torrent_sources \
|
||||||
|
--table=torrents \
|
||||||
|
--table=torrent_files \
|
||||||
|
--table=torrent_hints \
|
||||||
|
--table=torrent_contents \
|
||||||
|
--table=torrent_tags \
|
||||||
|
--table=torrents_torrent_sources \
|
||||||
|
--table=key_values \
|
||||||
|
bitmagnet \
|
||||||
|
>/tmp/backup.sql
|
||||||
|
mv /tmp/backup.sql /opt/
|
||||||
|
msg_ok "Database backed up"
|
||||||
|
|
||||||
|
msg_info "Updating ${APP} from $(cat /opt/bitmagnet_version.txt) to ${RELEASE}"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
$STD service bitmagnet stop
|
||||||
|
[ -f /opt/bitmagnet/.env ] && cp /opt/bitmagnet/.env /opt/
|
||||||
|
[ -f /opt/bitmagnet/config.yml ] && cp /opt/bitmagnet/config.yml /opt/
|
||||||
|
rm -rf /opt/bitmagnet/*
|
||||||
|
temp_file=$(mktemp)
|
||||||
|
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||||
|
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
|
||||||
|
cd /opt/bitmagnet
|
||||||
|
VREL=v$RELEASE
|
||||||
|
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
|
||||||
|
chmod +x bitmagnet
|
||||||
|
[ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/
|
||||||
|
[ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/
|
||||||
|
rm -f "$temp_file"
|
||||||
|
echo "${RELEASE}" >/opt/bitmagnet_version.txt
|
||||||
|
$STD service bitmagnet start
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+41
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Caddy"
|
APP="Caddy"
|
||||||
var_tags="${var_tags:-webserver}"
|
var_tags="${var_tags:-webserver}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-6}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-3}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-6}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /etc/caddy ]]; then
|
if [[ ! -d /etc/caddy ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -45,7 +55,28 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -d /etc/caddy ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
msg_info "Updating $APP LXC"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated $APP LXC"
|
||||||
|
|
||||||
|
msg_info "Restarting Caddy"
|
||||||
|
rc-service caddy restart
|
||||||
|
msg_ok "Restarted Caddy"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+31
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Docker"
|
APP="Docker"
|
||||||
var_tags="${var_tags:-docker}"
|
var_tags="${var_tags:-docker}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
msg_info "Updating base system"
|
msg_info "Updating base system"
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt upgrade -y
|
$STD apt upgrade -y
|
||||||
@@ -43,7 +52,18 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+41
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Forgejo"
|
APP="Forgejo"
|
||||||
var_tags="${var_tags:-git}"
|
var_tags="${var_tags:-git}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-10}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-10}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /opt/forgejo ]]; then
|
if [[ ! -d /opt/forgejo ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -50,7 +60,28 @@ function update_script() {
|
|||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at the latest version."
|
msg_ok "No update required. ${APP} is already at the latest version."
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating Forgejo"
|
||||||
|
$STD apk upgrade forgejo
|
||||||
|
msg_ok "Updated Forgejo"
|
||||||
|
|
||||||
|
msg_info "Restarting Forgejo"
|
||||||
|
$STD rc-service forgejo restart
|
||||||
|
msg_ok "Restarted Forgejo"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+58
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: MickLesk (CanbiZ)
|
# Author: MickLesk (CanbiZ)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Garage"
|
APP="Garage"
|
||||||
var_tags="${var_tags:-object-storage}"
|
var_tags="${var_tags:-object-storage}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-5}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-5}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-5}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /usr/local/bin/garage ]]; then
|
if [[ ! -f /usr/local/bin/garage ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -52,7 +62,45 @@ function update_script() {
|
|||||||
else
|
else
|
||||||
msg_ok "No update required. Garage is already at ${GITEA_RELEASE}"
|
msg_ok "No update required. Garage is already at ${GITEA_RELEASE}"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -f /usr/local/bin/garage ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
GITEA_RELEASE=$(curl -fsSL https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
|
||||||
|
if [[ "${GITEA_RELEASE}" != "$(cat ~/.garage 2>/dev/null)" ]] || [[ ! -f ~/.garage ]]; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
rc-service garage stop || true
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Backing Up Data"
|
||||||
|
cp /usr/local/bin/garage /usr/local/bin/garage.old 2>/dev/null || true
|
||||||
|
cp /etc/garage.toml /etc/garage.toml.bak 2>/dev/null || true
|
||||||
|
msg_ok "Backed Up Data"
|
||||||
|
|
||||||
|
msg_info "Updating Garage"
|
||||||
|
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
|
||||||
|
chmod +x /usr/local/bin/garage
|
||||||
|
echo "${GITEA_RELEASE}" >~/.garage
|
||||||
|
msg_ok "Updated Garage"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
rc-service garage start || rc-service garage restart
|
||||||
|
msg_ok "Started Service"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. Garage is already at ${GITEA_RELEASE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+55
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: Slaviša Arežina (tremor021)
|
# Author: Slaviša Arežina (tremor021)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="gatus"
|
APP="gatus"
|
||||||
var_tags="${var_tags:-monitoring}"
|
var_tags="${var_tags:-monitoring}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-3}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -d /opt/gatus ]]; then
|
if [[ ! -d /opt/gatus ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -50,7 +59,42 @@ function update_script() {
|
|||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -d /opt/gatus ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/TwiN/gatus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [ "${RELEASE}" != "$(cat /opt/gatus_version.txt)" ] || [ ! -f /opt/gatus_version.txt ]; then
|
||||||
|
msg_info "Updating ${APP} LXC"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
$STD service gatus stop
|
||||||
|
mv /opt/gatus/config/config.yaml /opt
|
||||||
|
rm -rf /opt/gatus/*
|
||||||
|
temp_file=$(mktemp)
|
||||||
|
curl -fsSL "https://github.com/TwiN/gatus/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||||
|
tar zxf "$temp_file" --strip-components=1 -C /opt/gatus
|
||||||
|
cd /opt/gatus
|
||||||
|
$STD go mod tidy
|
||||||
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
|
||||||
|
setcap CAP_NET_RAW+ep gatus
|
||||||
|
mv /opt/config.yaml config
|
||||||
|
rm -f "$temp_file"
|
||||||
|
echo "${RELEASE}" >/opt/gatus_version.txt
|
||||||
|
$STD service gatus start
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+41
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster) | Co-Author: Rogue-King
|
# Author: tteck (tteckster) | Co-Author: Rogue-King
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Gitea"
|
APP="Gitea"
|
||||||
var_tags="${var_tags:-git}"
|
var_tags="${var_tags:-git}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-8}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-8}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -f /usr/local/bin/gitea ]]; then
|
if [[ ! -f /usr/local/bin/gitea ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -43,7 +52,28 @@ function update_script() {
|
|||||||
msg_ok "Started service"
|
msg_ok "Started service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating Gitea"
|
||||||
|
apk upgrade gitea
|
||||||
|
msg_ok "Updated Gitea"
|
||||||
|
|
||||||
|
msg_info "Restarting Gitea"
|
||||||
|
rc-service gitea restart
|
||||||
|
msg_ok "Restarted Gitea"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+55
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Grafana"
|
APP="Grafana"
|
||||||
var_tags="${var_tags:-monitoring;visualization}"
|
var_tags="${var_tags:-monitoring;visualization}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if ! dpkg -s grafana >/dev/null 2>&1; then
|
if ! dpkg -s grafana >/dev/null 2>&1; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit 233
|
exit 233
|
||||||
@@ -43,7 +52,42 @@ function update_script() {
|
|||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt --only-upgrade install -y grafana
|
$STD apt --only-upgrade install -y grafana
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
|
|
||||||
|
CHOICE=$(msg_menu "Grafana Update Options" \
|
||||||
|
"1" "Check for Grafana Updates" \
|
||||||
|
"2" "Allow 0.0.0.0 for listening" \
|
||||||
|
"3" "Allow only ${LXCIP} for listening")
|
||||||
|
|
||||||
|
case $CHOICE in
|
||||||
|
1)
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana
|
||||||
|
service grafana restart
|
||||||
|
msg_ok "Allowed listening on all interfaces!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana
|
||||||
|
service grafana restart
|
||||||
|
msg_ok "Allowed listening only on ${LXCIP}!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+58
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: MickLesk (CanbiZ)
|
# Author: MickLesk (CanbiZ)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="IronClaw"
|
APP="IronClaw"
|
||||||
var_tags="${var_tags:-ai;agent;security}"
|
var_tags="${var_tags:-ai;agent;security}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-8}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-8}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-8}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -f /usr/local/bin/ironclaw ]]; then
|
if [[ ! -f /usr/local/bin/ironclaw ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -54,7 +63,45 @@ function update_script() {
|
|||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -f /usr/local/bin/ironclaw ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
RELEASE="ironclaw-v0.29.1"
|
||||||
|
if check_for_gh_release "ironclaw-bin" "nearai/ironclaw" "${RELEASE}" "IronClaw 1.0 (Reborn) is a ground-up rearchitecture with an incompatible CLI/config format; pinned until this script supports it"; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
rc-service ironclaw stop 2>/dev/null || true
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Backing up Configuration"
|
||||||
|
cp /root/.ironclaw/.env /root/ironclaw.env.bak
|
||||||
|
msg_ok "Backed up Configuration"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "${RELEASE}" "/usr/local/bin" \
|
||||||
|
"ironclaw-$(uname -m)-unknown-linux-musl.tar.gz"
|
||||||
|
chmod +x /usr/local/bin/ironclaw
|
||||||
|
|
||||||
|
msg_info "Restoring Configuration"
|
||||||
|
cp /root/ironclaw.env.bak /root/.ironclaw/.env
|
||||||
|
rm -f /root/ironclaw.env.bak
|
||||||
|
msg_ok "Restored Configuration"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
rc-service ironclaw start
|
||||||
|
msg_ok "Started Service"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+55
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: hoholms
|
# Author: hoholms
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Loki"
|
APP="Loki"
|
||||||
var_tags="${var_tags:-monitoring;logs}"
|
var_tags="${var_tags:-monitoring;logs}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if ! dpkg -s loki >/dev/null 2>&1; then
|
if ! dpkg -s loki >/dev/null 2>&1; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit 233
|
exit 233
|
||||||
@@ -69,7 +78,42 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit 0
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
|
|
||||||
|
CHOICE=$(msg_menu "Loki Update Options" \
|
||||||
|
"1" "Check for Loki Updates" \
|
||||||
|
"2" "Allow 0.0.0.0 for listening" \
|
||||||
|
"3" "Allow only ${LXCIP} for listening")
|
||||||
|
|
||||||
|
case $CHOICE in
|
||||||
|
1)
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/loki
|
||||||
|
service loki restart
|
||||||
|
msg_ok "Allowed listening on all interfaces!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/loki
|
||||||
|
service loki restart
|
||||||
|
msg_ok "Allowed listening only on ${LXCIP}!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+41
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="MariaDB"
|
APP="MariaDB"
|
||||||
var_tags="${var_tags:-database}"
|
var_tags="${var_tags:-database}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /etc/mysql/mariadb.conf.d ]]; then
|
if [[ ! -d /etc/mysql/mariadb.conf.d ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -33,7 +43,28 @@ function update_script() {
|
|||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt -y upgrade
|
$STD apt -y upgrade
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating MariaDB"
|
||||||
|
$STD apk upgrade mariadb mariadb-client
|
||||||
|
msg_ok "Updated MariaDB"
|
||||||
|
|
||||||
|
msg_info "Restarting MariaDB"
|
||||||
|
$STD rc-service mariadb restart
|
||||||
|
msg_ok "Restarted MariaDB"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+45
-9
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Node-Red"
|
APP="Node-Red"
|
||||||
var_tags="${var_tags:-automation}"
|
var_tags="${var_tags:-automation}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /root/.node-red ]]; then
|
if [[ ! -d /root/.node-red ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -86,6 +96,32 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating Node.js and npm"
|
||||||
|
$STD apk upgrade nodejs npm
|
||||||
|
msg_ok "Updated Node.js and npm"
|
||||||
|
|
||||||
|
msg_info "Updating Node-RED"
|
||||||
|
$STD npm install -g --unsafe-perm node-red
|
||||||
|
msg_ok "Updated Node-RED"
|
||||||
|
|
||||||
|
msg_info "Restarting Node-RED"
|
||||||
|
$STD rc-service nodered restart
|
||||||
|
msg_ok "Restarted Node-RED"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
build_container
|
build_container
|
||||||
description
|
description
|
||||||
|
|||||||
+42
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: CrazyWolf13
|
# Author: CrazyWolf13
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="ntfy"
|
APP="ntfy"
|
||||||
var_tags="${var_tags:-notification}"
|
var_tags="${var_tags:-notification}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /etc/ntfy ]]; then
|
if [[ ! -d /etc/ntfy ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -48,7 +58,29 @@ function update_script() {
|
|||||||
$STD apt upgrade -y
|
$STD apt upgrade -y
|
||||||
msg_ok "Updated ntfy"
|
msg_ok "Updated ntfy"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -d /etc/ntfy ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
msg_info "Updating ntfy LXC"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy
|
||||||
|
msg_ok "Updated ntfy LXC"
|
||||||
|
|
||||||
|
msg_info "Restarting ntfy"
|
||||||
|
rc-service ntfy restart
|
||||||
|
msg_ok "Restarted ntfy"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+48
-17
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,31 +10,60 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="PostgreSQL"
|
APP="PostgreSQL"
|
||||||
var_tags="${var_tags:-database}"
|
var_tags="${var_tags:-database}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
|
update_deb_based() {
|
||||||
|
if ! command -v psql >/dev/null 2>&1; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
msg_info "Updating ${APP} LXC"
|
||||||
|
$STD apt update
|
||||||
|
$STD apt -y upgrade
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating PostgreSQL"
|
||||||
|
$STD apk upgrade postgresql postgresql-contrib
|
||||||
|
msg_ok "Updated PostgreSQL"
|
||||||
|
|
||||||
|
msg_info "Restarting PostgreSQL"
|
||||||
|
$STD rc-service postgresql restart
|
||||||
|
msg_ok "Restarted PostgreSQL"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if ! command -v psql >/dev/null 2>&1; then
|
run_os_update
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_info "Updating ${APP} LXC"
|
|
||||||
$STD apt update
|
|
||||||
$STD apt -y upgrade
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+41
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Prometheus"
|
APP="Prometheus"
|
||||||
var_tags="${var_tags:-monitoring}"
|
var_tags="${var_tags:-monitoring}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /etc/systemd/system/prometheus.service ]]; then
|
if [[ ! -f /etc/systemd/system/prometheus.service ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -42,7 +52,28 @@ function update_script() {
|
|||||||
|
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating Prometheus"
|
||||||
|
$STD apk upgrade prometheus
|
||||||
|
msg_ok "Updated Prometheus"
|
||||||
|
|
||||||
|
msg_info "Restarting Prometheus"
|
||||||
|
$STD rc-service prometheus restart
|
||||||
|
msg_ok "Restarted Prometheus"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+45
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: Slaviša Arežina (tremor021)
|
# Author: Slaviša Arežina (tremor021)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Rclone"
|
APP="Rclone"
|
||||||
var_tags="${var_tags:-os}"
|
var_tags="${var_tags:-os}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
var_fuse="${var_fuse:-yes}"
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /opt/rclone ]]; then
|
if [[ ! -d /opt/rclone ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -41,7 +50,32 @@ function update_script() {
|
|||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [ ! -d /opt/rclone ]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [ "${RELEASE}" != "$(cat /opt/rclone_version.txt)" ] || [ ! -f /opt/rclone_version.txt ]; then
|
||||||
|
msg_info "Updating ${APP} LXC"
|
||||||
|
temp_file=$(mktemp)
|
||||||
|
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-$(arch_resolve).zip" -o "$temp_file"
|
||||||
|
$STD unzip -o "$temp_file" '*/**' -d /opt/rclone
|
||||||
|
rm -f "$temp_file"
|
||||||
|
echo "${RELEASE}" >/opt/rclone_version.txt
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+63
-13
@@ -1,40 +1,90 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster) | MickLesk (CanbiZ)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://redis.io/
|
# Source: https://redis.io/
|
||||||
|
|
||||||
APP="Redis"
|
APP="Redis"
|
||||||
var_tags="${var_tags:-database}"
|
var_tags="${var_tags:-database}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine 3.24 (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /lib/systemd/system/redis-server.service ]]; then
|
if [[ ! -f /lib/systemd/system/redis-server.service ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Updating $APP LXC"
|
msg_info "Updating $APP LXC"
|
||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt upgrade -y
|
$STD apt upgrade -y
|
||||||
msg_ok "Updated $APP LXC"
|
msg_ok "Updated $APP LXC"
|
||||||
msg_ok "Updated successfully!"
|
}
|
||||||
exit
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -f /etc/init.d/redis ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
|
CHOICE=$(msg_menu "Redis Management" \
|
||||||
|
"1" "Update Redis" \
|
||||||
|
"2" "Allow 0.0.0.0 for listening" \
|
||||||
|
"3" "Allow only ${LXCIP} for listening")
|
||||||
|
|
||||||
|
case "$CHOICE" in
|
||||||
|
1)
|
||||||
|
msg_info "Updating Redis"
|
||||||
|
$STD apk update
|
||||||
|
$STD apk upgrade redis
|
||||||
|
rc-service redis restart
|
||||||
|
msg_ok "Updated Redis"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
msg_info "Setting Redis to listen on all interfaces"
|
||||||
|
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf
|
||||||
|
rc-service redis restart
|
||||||
|
msg_ok "Redis now listens on all interfaces"
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
msg_info "Setting Redis to listen only on ${LXCIP}"
|
||||||
|
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/redis.conf
|
||||||
|
rc-service redis restart
|
||||||
|
msg_ok "Redis now listens only on ${LXCIP}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+71
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: Slaviša Arežina (tremor021)
|
# Author: Slaviša Arežina (tremor021)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="RustDesk Server"
|
APP="RustDesk Server"
|
||||||
var_tags="${var_tags:-remote-desktop}"
|
var_tags="${var_tags:-remote-desktop}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-3}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -x /usr/bin/hbbr ]]; then
|
if [[ ! -x /usr/bin/hbbr ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -50,7 +59,58 @@ function update_script() {
|
|||||||
|
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -d /opt/rustdesk-server ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
APIRELEASE=$(curl -s https://api.github.com/repos/lejianwen/rustdesk-api/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/lejianwen/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
if [ "${RELEASE}" != "$(cat ~/.rustdesk-server 2>/dev/null)" ] || [ ! -f ~/.rustdesk-server ]; then
|
||||||
|
msg_info "Updating RustDesk Server to v${RELEASE}"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
$STD service rustdesk-server-hbbs stop
|
||||||
|
$STD service rustdesk-server-hbbr stop
|
||||||
|
temp_file1=$(mktemp)
|
||||||
|
ARCH=$(arch_resolve "amd64" "arm64v8")
|
||||||
|
curl -fsSL "https://github.com/lejianwen/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-linux-${ARCH}.zip" -o "$temp_file1"
|
||||||
|
$STD unzip "$temp_file1"
|
||||||
|
cp -r "$ARCH"/* /opt/rustdesk-server/
|
||||||
|
echo "${RELEASE}" >~/.rustdesk-server
|
||||||
|
$STD service rustdesk-server-hbbs start
|
||||||
|
$STD service rustdesk-server-hbbr start
|
||||||
|
rm -rf "$ARCH"
|
||||||
|
rm -f "$temp_file1"
|
||||||
|
msg_ok "Updated RustDesk Server"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
|
fi
|
||||||
|
if [ "${APIRELEASE}" != "$(cat ~/.rustdesk-api)" ] || [ ! -f ~/.rustdesk-api ]; then
|
||||||
|
msg_info "Updating RustDesk API to v${APIRELEASE}"
|
||||||
|
$STD service rustdesk-api stop
|
||||||
|
temp_file2=$(mktemp)
|
||||||
|
curl -fsSL "https://github.com/lejianwen/rustdesk-api/releases/download/v${APIRELEASE}/linux-$(arch_resolve).tar.gz" -o "$temp_file2"
|
||||||
|
$STD tar zxvf "$temp_file2"
|
||||||
|
cp -r release/* /opt/rustdesk-api
|
||||||
|
echo "${APIRELEASE}" >~/.rustdesk-api
|
||||||
|
$STD service rustdesk-api start
|
||||||
|
rm -rf release
|
||||||
|
rm -f "$temp_file2"
|
||||||
|
msg_ok "Updated RustDesk API"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. RustDesk API is already at v${APIRELEASE}"
|
||||||
|
fi
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+43
-11
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: GoldenSpringness
|
# Author: GoldenSpringness
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,23 +10,30 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
|
|||||||
APP="rustypaste"
|
APP="rustypaste"
|
||||||
var_tags="${var_tags:-pastebin;storage}"
|
var_tags="${var_tags:-pastebin;storage}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-20}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-no}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-20}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -f /opt/rustypaste/rustypaste ]]; then
|
if [[ ! -f /opt/rustypaste/rustypaste ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -50,7 +59,30 @@ function update_script() {
|
|||||||
if check_for_gh_release "rustypaste-cli" "orhun/rustypaste-cli"; then
|
if check_for_gh_release "rustypaste-cli" "orhun/rustypaste-cli"; then
|
||||||
fetch_and_deploy_gh_release "rustypaste-cli" "orhun/rustypaste-cli" "prebuild" "latest" "/usr/local/bin" "*x86_64-unknown-linux-gnu.tar.gz"
|
fetch_and_deploy_gh_release "rustypaste-cli" "orhun/rustypaste-cli" "prebuild" "latest" "/usr/local/bin" "*x86_64-unknown-linux-gnu.tar.gz"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if ! apk info -e rustypaste >/dev/null 2>&1; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Updating RustyPaste"
|
||||||
|
$STD apk update
|
||||||
|
$STD apk upgrade rustypaste --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||||
|
msg_ok "Updated RustyPaste"
|
||||||
|
|
||||||
|
msg_info "Restarting Services"
|
||||||
|
$STD rc-service rustypaste restart
|
||||||
|
msg_ok "Restarted Services"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+41
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Syncthing"
|
APP="Syncthing"
|
||||||
var_tags="${var_tags:-sync}"
|
var_tags="${var_tags:-sync}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-8}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-8}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /etc/apt/sources.list.d/syncthing.list && ! -f /etc/apt/sources.list.d/syncthing.sources ]]; then
|
if [[ ! -f /etc/apt/sources.list.d/syncthing.list && ! -f /etc/apt/sources.list.d/syncthing.sources ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -33,7 +43,28 @@ function update_script() {
|
|||||||
$STD apt update
|
$STD apt update
|
||||||
$STD apt upgrade -y
|
$STD apt upgrade -y
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating Syncthing"
|
||||||
|
$STD apk upgrade syncthing
|
||||||
|
msg_ok "Updated Syncthing"
|
||||||
|
|
||||||
|
msg_info "Restarting Syncthing"
|
||||||
|
$STD rc-service syncthing restart
|
||||||
|
msg_ok "Restarted Syncthing"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+51
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: tremor021 (Slaviša Arežina)
|
# Author: tremor021 (Slaviša Arežina)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Teamspeak-Server"
|
APP="Teamspeak-Server"
|
||||||
var_tags="${var_tags:-voice;communication}"
|
var_tags="${var_tags:-voice;communication}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-no}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /opt/teamspeak-server ]]; then
|
if [[ ! -d /opt/teamspeak-server ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -50,7 +60,38 @@ function update_script() {
|
|||||||
else
|
else
|
||||||
msg_ok "Already up to date"
|
msg_ok "Already up to date"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -d /opt/teamspeak-server ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
RELEASE=$(curl -fsSL https://teamspeak.com/en/downloads/#server | sed -n 's/.*teamspeak3-server_linux_amd64-\([0-9.]*[0-9]\).*/\1/p' | awk 'NR==1')
|
||||||
|
|
||||||
|
if [ "${RELEASE}" != "$(cat ~/.teamspeak-server)" ] || [ ! -f ~/.teamspeak-server ]; then
|
||||||
|
msg_info "Updating ${APP} LXC"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
$STD service teamspeak stop
|
||||||
|
curl -fsSL "https://files.teamspeak-services.com/releases/server/${RELEASE}/teamspeak3-server_linux_amd64-${RELEASE}.tar.bz2" -o ts3server.tar.bz2
|
||||||
|
tar -xf ./ts3server.tar.bz2
|
||||||
|
cp -ru teamspeak3-server_linux_amd64/* /opt/teamspeak-server/
|
||||||
|
rm -f ~/ts3server.tar.bz*
|
||||||
|
rm -rf teamspeak3-server_linux_amd64
|
||||||
|
echo "${RELEASE}" >~/.teamspeak-server
|
||||||
|
$STD service teamspeak start
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+72
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: MickLesk (CanbiZ)
|
# Author: MickLesk (CanbiZ)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Tinyauth"
|
APP="Tinyauth"
|
||||||
var_tags="${var_tags:-auth}"
|
var_tags="${var_tags:-auth}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /opt/tinyauth ]]; then
|
if [[ ! -d /opt/tinyauth ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -41,7 +51,59 @@ function update_script() {
|
|||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
if [[ ! -d /opt/tinyauth ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Updating packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated packages"
|
||||||
|
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/tinyauthapp/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [ "${RELEASE}" != "$(cat ~/.tinyauth 2>/dev/null)" ] || [ ! -f ~/.tinyauth ]; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
$STD service tinyauth stop
|
||||||
|
msg_ok "Service Stopped"
|
||||||
|
|
||||||
|
if [[ -f /opt/tinyauth/.env ]] && ! grep -q "^TINYAUTH_" /opt/tinyauth/.env; then
|
||||||
|
msg_info "Migrating .env to v5 format"
|
||||||
|
sed -i \
|
||||||
|
-e 's/^DATABASE_PATH=/TINYAUTH_DATABASE_PATH=/' \
|
||||||
|
-e 's/^USERS=/TINYAUTH_AUTH_USERS=/' \
|
||||||
|
-e "s/^USERS='/TINYAUTH_AUTH_USERS='/" \
|
||||||
|
-e 's/^APP_URL=/TINYAUTH_APPURL=/' \
|
||||||
|
-e 's/^SECRET=/TINYAUTH_AUTH_SECRET=/' \
|
||||||
|
-e 's/^PORT=/TINYAUTH_SERVER_PORT=/' \
|
||||||
|
-e 's/^ADDRESS=/TINYAUTH_SERVER_ADDRESS=/' \
|
||||||
|
/opt/tinyauth/.env
|
||||||
|
msg_ok "Migrated .env to v5 format"
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Updating Tinyauth"
|
||||||
|
rm -f /opt/tinyauth/tinyauth
|
||||||
|
curl -fsSL "https://github.com/tinyauthapp/tinyauth/releases/download/v${RELEASE}/tinyauth-$(arch_resolve)" -o /opt/tinyauth/tinyauth
|
||||||
|
chmod +x /opt/tinyauth/tinyauth
|
||||||
|
echo "${RELEASE}" >~/.tinyauth
|
||||||
|
msg_ok "Updated Tinyauth"
|
||||||
|
|
||||||
|
msg_info "Restarting Tinyauth"
|
||||||
|
$STD service tinyauth start
|
||||||
|
msg_ok "Restarted Tinyauth"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+37
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Traefik"
|
APP="Traefik"
|
||||||
var_tags="${var_tags:-proxy}"
|
var_tags="${var_tags:-proxy}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-2}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-2}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /etc/systemd/system/traefik.service ]]; then
|
if [[ ! -f /etc/systemd/system/traefik.service ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -41,7 +51,24 @@ function update_script() {
|
|||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating traefik from edge"
|
||||||
|
$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||||
|
msg_ok "Updated traefik"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+41
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Transmission"
|
APP="Transmission"
|
||||||
var_tags="${var_tags:-torrent}"
|
var_tags="${var_tags:-torrent}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-8}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-8}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /etc/transmission-daemon/settings.json ]]; then
|
if [[ ! -f /etc/transmission-daemon/settings.json ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -33,7 +43,28 @@ function update_script() {
|
|||||||
$STD apt -y upgrade
|
$STD apt -y upgrade
|
||||||
msg_ok "Updated Transmission"
|
msg_ok "Updated Transmission"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating Transmission"
|
||||||
|
$STD apk upgrade transmission-daemon
|
||||||
|
msg_ok "Updated Transmission"
|
||||||
|
|
||||||
|
msg_info "Restarting Transmission"
|
||||||
|
$STD rc-service transmission-daemon restart
|
||||||
|
msg_ok "Restarted Transmission"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+67
-17
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: pshankinclarke (lazarillo)
|
# Author: pshankinclarke (lazarillo)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,32 +10,80 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Valkey"
|
APP="Valkey"
|
||||||
var_tags="${var_tags:-database}"
|
var_tags="${var_tags:-database}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
if [[ ! -f /lib/systemd/system/valkey-server.service ]]; then
|
||||||
check_container_storage
|
msg_error "No Valkey Installation Found!"
|
||||||
check_container_resources
|
exit
|
||||||
if [[ ! -f /lib/systemd/system/valkey-server.service ]]; then
|
fi
|
||||||
msg_error "No Valkey Installation Found!"
|
msg_info "Updating Valkey LXC"
|
||||||
exit
|
$STD apt update
|
||||||
fi
|
$STD apt -y upgrade
|
||||||
msg_info "Updating Valkey LXC"
|
msg_ok "Updated Valkey LXC"
|
||||||
$STD apt update
|
msg_ok "Updated successfully!"
|
||||||
$STD apt -y upgrade
|
}
|
||||||
msg_ok "Updated Valkey LXC"
|
|
||||||
|
update_alpine() {
|
||||||
|
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
|
|
||||||
|
CHOICE=$(msg_menu "Valkey Management" \
|
||||||
|
"1" "Update Valkey" \
|
||||||
|
"2" "Allow 0.0.0.0 for listening" \
|
||||||
|
"3" "Allow only ${LXCIP} for listening")
|
||||||
|
|
||||||
|
case $CHOICE in
|
||||||
|
1)
|
||||||
|
msg_info "Updating Valkey"
|
||||||
|
apk update && apk upgrade valkey
|
||||||
|
rc-service valkey restart
|
||||||
|
msg_ok "Updated Valkey"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
exit
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
msg_info "Setting Valkey to listen on all interfaces"
|
||||||
|
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
|
||||||
|
rc-service valkey restart
|
||||||
|
msg_ok "Valkey now listens on all interfaces!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
msg_info "Setting Valkey to listen only on ${LXCIP}"
|
||||||
|
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/valkey/valkey.conf
|
||||||
|
rc-service valkey restart
|
||||||
|
msg_ok "Valkey now listens only on ${LXCIP}!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+61
-9
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Vaultwarden"
|
APP="Vaultwarden"
|
||||||
var_tags="${var_tags:-password-manager}"
|
var_tags="${var_tags:-password-manager}"
|
||||||
var_cpu="${var_cpu:-4}"
|
var_cpu="${var_cpu:-4}"
|
||||||
var_ram="${var_ram:-6144}"
|
|
||||||
var_disk="${var_disk:-20}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-6144}"
|
||||||
|
var_disk="${var_disk:-20}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then
|
if [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -115,6 +125,48 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
CHOICE=$(msg_menu "Vaultwarden Update Options" \
|
||||||
|
"1" "Update Vaultwarden" \
|
||||||
|
"2" "Reset ADMIN_TOKEN")
|
||||||
|
|
||||||
|
case $CHOICE in
|
||||||
|
1)
|
||||||
|
$STD apk -U upgrade
|
||||||
|
rc-service vaultwarden restart -q
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
|
||||||
|
msg_warn "Reset ADMIN_TOKEN requires interactive mode, skipping."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
read -r -s -p "Setup your ADMIN_TOKEN (make it strong): " NEWTOKEN
|
||||||
|
echo ""
|
||||||
|
if [[ -n "$NEWTOKEN" ]]; then
|
||||||
|
if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi
|
||||||
|
TOKEN=$(echo -n "${NEWTOKEN}" | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1)
|
||||||
|
if [[ ! -f /var/lib/vaultwarden/config.json ]]; then
|
||||||
|
sed -i "s|export ADMIN_TOKEN=.*|export ADMIN_TOKEN='${TOKEN}'|" /etc/conf.d/vaultwarden
|
||||||
|
else
|
||||||
|
sed -i "s|\"admin_token\": .*|\"admin_token\": \"${TOKEN}\",|" /var/lib/vaultwarden/config.json
|
||||||
|
fi
|
||||||
|
rc-service vaultwarden restart -q
|
||||||
|
msg_ok "Admin token updated"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
build_container
|
build_container
|
||||||
description
|
description
|
||||||
|
|||||||
+46
-12
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,28 +10,35 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Wireguard"
|
APP="Wireguard"
|
||||||
var_tags="${var_tags:-network;vpn}"
|
var_tags="${var_tags:-network;vpn}"
|
||||||
var_cpu="${var_cpu:-1}"
|
var_cpu="${var_cpu:-1}"
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
var_tun="${var_tun:-1}"
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-512}"
|
||||||
|
var_disk="${var_disk:-4}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /etc/wireguard ]]; then
|
if [[ ! -d /etc/wireguard ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ensure_dependencies git
|
ensure_dependencies git
|
||||||
|
|
||||||
msg_info "Updating LXC"
|
msg_info "Updating LXC"
|
||||||
@@ -43,7 +52,32 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
msg_ok "Updated LXC"
|
msg_ok "Updated LXC"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "update wireguard-tools"
|
||||||
|
$STD apk add --no-cache --upgrade wireguard-tools
|
||||||
|
msg_ok "wireguard-tools updated"
|
||||||
|
|
||||||
|
if [[ -d /etc/wgdashboard/src ]]; then
|
||||||
|
msg_info "update WGDashboard"
|
||||||
|
cd /etc/wgdashboard/src
|
||||||
|
echo "y" | ./wgd.sh update >/dev/null 2>&1
|
||||||
|
$STD ./wgd.sh start
|
||||||
|
msg_ok "WGDashboard updated"
|
||||||
|
fi
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
+31
-10
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||||
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 tteck
|
# Copyright (c) 2021-2026 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -8,22 +10,30 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
APP="Zigbee2MQTT"
|
APP="Zigbee2MQTT"
|
||||||
var_tags="${var_tags:-smarthome;zigbee;mqtt}"
|
var_tags="${var_tags:-smarthome;zigbee;mqtt}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-5}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-0}"
|
var_unprivileged="${var_unprivileged:-0}"
|
||||||
|
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_os=$(msg_menu "Choose the container OS" \
|
||||||
|
"debian" "Debian 13" \
|
||||||
|
"alpine" "Alpine (smaller footprint)")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${var_os:-}" == "alpine" ]]; then
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_version="${var_version:-3.24}"
|
||||||
|
else
|
||||||
|
var_ram="${var_ram:-1024}"
|
||||||
|
var_disk="${var_disk:-5}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
fi
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
update_deb_based() {
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -d /opt/zigbee2mqtt ]]; then
|
if [[ ! -d /opt/zigbee2mqtt ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
@@ -62,7 +72,18 @@ function update_script() {
|
|||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
}
|
||||||
|
|
||||||
|
update_alpine() {
|
||||||
|
$STD apk -U upgrade
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
run_os_update
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|||||||
@@ -13,10 +13,11 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "AdGuardHome" "AdguardTeam/AdGuardHome" "prebuild" "latest" "/opt/AdGuardHome" "AdGuardHome_linux_$(arch_resolve).tar.gz"
|
setup_deb_based() {
|
||||||
|
fetch_and_deploy_gh_release "AdGuardHome" "AdguardTeam/AdGuardHome" "prebuild" "latest" "/opt/AdGuardHome" "AdGuardHome_linux_$(arch_resolve).tar.gz"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/AdGuardHome.service
|
cat <<EOF >/etc/systemd/system/AdGuardHome.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=AdGuard Home: Network-level blocker
|
Description=AdGuard Home: Network-level blocker
|
||||||
ConditionFileIsExecutable=/opt/AdGuardHome/AdGuardHome
|
ConditionFileIsExecutable=/opt/AdGuardHome/AdGuardHome
|
||||||
@@ -36,8 +37,43 @@ EnvironmentFile=-/etc/sysconfig/AdGuardHome
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now AdGuardHome
|
systemctl enable -q --now AdGuardHome
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Downloading AdGuard Home"
|
||||||
|
$STD curl -fsSL -o /tmp/AdGuardHome_linux_$(arch_resolve).tar.gz \
|
||||||
|
"https://github.com/AdguardTeam/AdGuardHome/releases/latest/download/AdGuardHome_linux_$(arch_resolve).tar.gz"
|
||||||
|
msg_ok "Downloaded AdGuard Home"
|
||||||
|
|
||||||
|
msg_info "Installing AdGuard Home"
|
||||||
|
$STD tar -xzf /tmp/AdGuardHome_linux_$(arch_resolve).tar.gz -C /opt
|
||||||
|
$STD rm /tmp/AdGuardHome_linux_$(arch_resolve).tar.gz
|
||||||
|
msg_ok "Installed AdGuard Home"
|
||||||
|
|
||||||
|
msg_info "Creating AdGuard Home Service"
|
||||||
|
cat <<EOF >/etc/init.d/adguardhome
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
name="AdGuardHome"
|
||||||
|
description="AdGuard Home Service"
|
||||||
|
command="/opt/AdGuardHome/AdGuardHome"
|
||||||
|
command_background="yes"
|
||||||
|
pidfile="/run/adguardhome.pid"
|
||||||
|
EOF
|
||||||
|
$STD chmod +x /etc/init.d/adguardhome
|
||||||
|
msg_ok "Created AdGuard Home Service"
|
||||||
|
|
||||||
|
msg_info "Enabling AdGuard Home Service"
|
||||||
|
$STD rc-update add adguardhome default
|
||||||
|
msg_ok "Enabled AdGuard Home Service"
|
||||||
|
|
||||||
|
msg_info "Starting AdGuard Home"
|
||||||
|
$STD rc-service adguardhome start
|
||||||
|
msg_ok "Started AdGuard Home"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://adguardhome.com/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Downloading AdGuard Home"
|
|
||||||
$STD curl -fsSL -o /tmp/AdGuardHome_linux_$(arch_resolve).tar.gz \
|
|
||||||
"https://github.com/AdguardTeam/AdGuardHome/releases/latest/download/AdGuardHome_linux_$(arch_resolve).tar.gz"
|
|
||||||
msg_ok "Downloaded AdGuard Home"
|
|
||||||
|
|
||||||
msg_info "Installing AdGuard Home"
|
|
||||||
$STD tar -xzf /tmp/AdGuardHome_linux_$(arch_resolve).tar.gz -C /opt
|
|
||||||
$STD rm /tmp/AdGuardHome_linux_$(arch_resolve).tar.gz
|
|
||||||
msg_ok "Installed AdGuard Home"
|
|
||||||
|
|
||||||
msg_info "Creating AdGuard Home Service"
|
|
||||||
cat <<EOF >/etc/init.d/adguardhome
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
name="AdGuardHome"
|
|
||||||
description="AdGuard Home Service"
|
|
||||||
command="/opt/AdGuardHome/AdGuardHome"
|
|
||||||
command_background="yes"
|
|
||||||
pidfile="/run/adguardhome.pid"
|
|
||||||
EOF
|
|
||||||
$STD chmod +x /etc/init.d/adguardhome
|
|
||||||
msg_ok "Created AdGuard Home Service"
|
|
||||||
|
|
||||||
msg_info "Enabling AdGuard Home Service"
|
|
||||||
$STD rc-update add adguardhome default
|
|
||||||
msg_ok "Enabled AdGuard Home Service"
|
|
||||||
|
|
||||||
msg_info "Starting AdGuard Home"
|
|
||||||
$STD rc-service adguardhome start
|
|
||||||
msg_ok "Started AdGuard Home"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/bitmagnet-io/bitmagnet
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
gcc \
|
|
||||||
musl-dev \
|
|
||||||
git \
|
|
||||||
iproute2-ss \
|
|
||||||
sudo
|
|
||||||
$STD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community go
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing PostgreSQL"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
postgresql16 \
|
|
||||||
postgresql16-contrib \
|
|
||||||
postgresql16-openrc
|
|
||||||
$STD rc-update add postgresql
|
|
||||||
$STD rc-service postgresql start
|
|
||||||
msg_ok "Installed PostreSQL"
|
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
|
|
||||||
msg_info "Installing bitmagnet v${RELEASE}"
|
|
||||||
mkdir -p /opt/bitmagnet
|
|
||||||
temp_file=$(mktemp)
|
|
||||||
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
|
||||||
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
|
|
||||||
cd /opt/bitmagnet
|
|
||||||
VREL=v$RELEASE
|
|
||||||
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
|
|
||||||
chmod +x bitmagnet
|
|
||||||
$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'"
|
|
||||||
echo "${RELEASE}" >/opt/bitmagnet_version.txt
|
|
||||||
msg_ok "Installed bitmagnet v${RELEASE}"
|
|
||||||
|
|
||||||
read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
|
|
||||||
|
|
||||||
msg_info "Enabling bitmagnet Service"
|
|
||||||
cat <<EOF >/etc/init.d/bitmagnet
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
description="bitmagnet Service"
|
|
||||||
directory="/opt/bitmagnet"
|
|
||||||
command="/opt/bitmagnet/bitmagnet"
|
|
||||||
command_args="worker run --all"
|
|
||||||
command_background="true"
|
|
||||||
command_user="root"
|
|
||||||
pidfile="/var/run/bitmagnet.pid"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}
|
|
||||||
|
|
||||||
start_pre() {
|
|
||||||
export TMDB_API_KEY="$tmdbapikey"
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/bitmagnet
|
|
||||||
$STD rc-update add bitmagnet default
|
|
||||||
msg_ok "Enabled bitmagnet Service"
|
|
||||||
|
|
||||||
msg_info "Starting bitmagnet"
|
|
||||||
$STD service bitmagnet start
|
|
||||||
msg_ok "Started bitmagnet"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -f "$temp_file"
|
|
||||||
$STD apk cache clean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: cobalt (cobaltgit)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://caddyserver.com/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Caddy"
|
|
||||||
$STD apk add --no-cache caddy caddy-openrc
|
|
||||||
cat <<EOF >/etc/caddy/Caddyfile
|
|
||||||
:80 {
|
|
||||||
# Set this path to your site's directory.
|
|
||||||
root * /var/www/html
|
|
||||||
|
|
||||||
# Enable the static file server.
|
|
||||||
file_server
|
|
||||||
|
|
||||||
# Another common task is to set up a reverse proxy:
|
|
||||||
# reverse_proxy localhost:8080
|
|
||||||
|
|
||||||
# Or serve a PHP site through php-fpm:
|
|
||||||
# php_fastcgi localhost:9000
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
mkdir -p /var/www/html
|
|
||||||
cat <<EOF >/var/www/html/index.html
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Caddy works!</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Hello Caddy!</h1>
|
|
||||||
<p>For more information, refer to the Caddy <a href="https://caddyserver.com/docs/">documentation</a><p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
EOF
|
|
||||||
msg_ok "Installed Caddy"
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
|
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
|
|
||||||
msg_info "Setup xCaddy"
|
|
||||||
cd /opt
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
|
||||||
curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.tar.gz" -o "xcaddy_${RELEASE:1}_linux_amd64.tar.gz"
|
|
||||||
$STD tar xzf xcaddy_"${RELEASE:1}"_linux_amd64.tar.gz -C /usr/local/bin xcaddy
|
|
||||||
rm -rf /opt/xcaddy*
|
|
||||||
$STD xcaddy build
|
|
||||||
msg_ok "Setup xCaddy"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Enabling Caddy Service"
|
|
||||||
$STD rc-update add caddy default
|
|
||||||
msg_ok "Enabled Caddy Service"
|
|
||||||
|
|
||||||
msg_info "Starting Caddy"
|
|
||||||
$STD service caddy start
|
|
||||||
msg_ok "Started Caddy"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.docker.com/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add tzdata openssl
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Docker"
|
|
||||||
$STD apk add docker
|
|
||||||
$STD rc-service docker start
|
|
||||||
$STD rc-update add docker default
|
|
||||||
msg_ok "Installed Docker"
|
|
||||||
|
|
||||||
get_latest_release() {
|
|
||||||
curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
|
||||||
}
|
|
||||||
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
|
|
||||||
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent")
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to add Docker Compose? <y/N> " prompt
|
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
|
|
||||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
|
||||||
mkdir -p "$DOCKER_CONFIG"/cli-plugins
|
|
||||||
curl -fsSL https://github.com/docker/compose/releases/download/"$DOCKER_COMPOSE_LATEST_VERSION"/docker-compose-linux-$(arch_resolve "x86_64" "aarch64") -o ~/.docker/cli-plugins/docker-compose
|
|
||||||
chmod +x "$DOCKER_CONFIG"/cli-plugins/docker-compose
|
|
||||||
msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if prompt_confirm "${TAB3}Would you like to install Portainer (UI) via the community-scripts addon?" "n" 60; then
|
|
||||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/portainer.sh)" <<<"y"
|
|
||||||
else
|
|
||||||
read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt
|
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
|
|
||||||
$STD docker run -d \
|
|
||||||
-p 9001:9001 \
|
|
||||||
--name portainer_agent \
|
|
||||||
--restart=always \
|
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
||||||
-v /var/lib/docker/volumes:/var/lib/docker/volumes \
|
|
||||||
portainer/agent
|
|
||||||
msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to expose the Docker TCP socket? <y/N> " prompt
|
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
msg_info "Exposing Docker TCP socket"
|
|
||||||
$STD mkdir -p /etc/docker
|
|
||||||
$STD echo '{ "hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"] }' >/etc/docker/daemon.json
|
|
||||||
$STD rc-service docker restart
|
|
||||||
msg_ok "Exposed Docker TCP socket at tcp://+:2375"
|
|
||||||
fi
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Johann3s-H (An!ma)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://forgejo.org/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Forgejo"
|
|
||||||
$STD apk add --no-cache forgejo
|
|
||||||
msg_ok "Installed Forgejo"
|
|
||||||
|
|
||||||
msg_info "Enabling Forgejo Service"
|
|
||||||
$STD rc-update add forgejo default
|
|
||||||
msg_ok "Enabled Forgejo Service"
|
|
||||||
|
|
||||||
msg_info "Starting Forgejo"
|
|
||||||
$STD service forgejo start
|
|
||||||
msg_ok "Started Forgejo"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://garagehq.deuxfleurs.fr/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add --no-cache openssl
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
|
|
||||||
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
|
|
||||||
chmod +x /usr/local/bin/garage
|
|
||||||
mkdir -p /var/lib/garage/{data,meta,snapshots}
|
|
||||||
mkdir -p /etc/garage
|
|
||||||
RPC_SECRET=$(openssl rand -hex 64 | cut -c1-64)
|
|
||||||
ADMIN_TOKEN=$(openssl rand -base64 32)
|
|
||||||
METRICS_TOKEN=$(openssl rand -base64 32)
|
|
||||||
cat <<EOF >~/garage.creds
|
|
||||||
Garage Tokens and Secrets
|
|
||||||
RPC Secret: $RPC_SECRET
|
|
||||||
Admin Token: $ADMIN_TOKEN
|
|
||||||
Metrics Token: $METRICS_TOKEN
|
|
||||||
EOF
|
|
||||||
echo $GITEA_RELEASE >>~/.garage
|
|
||||||
cat <<EOF >/etc/garage.toml
|
|
||||||
metadata_dir = "/var/lib/garage/meta"
|
|
||||||
data_dir = "/var/lib/garage/data"
|
|
||||||
db_engine = "sqlite"
|
|
||||||
replication_factor = 1
|
|
||||||
|
|
||||||
rpc_bind_addr = "0.0.0.0:3901"
|
|
||||||
rpc_public_addr = "127.0.0.1:3901"
|
|
||||||
rpc_secret = "${RPC_SECRET}"
|
|
||||||
|
|
||||||
[s3_api]
|
|
||||||
s3_region = "garage"
|
|
||||||
api_bind_addr = "0.0.0.0:3900"
|
|
||||||
root_domain = ".s3.garage"
|
|
||||||
|
|
||||||
[s3_web]
|
|
||||||
bind_addr = "0.0.0.0:3902"
|
|
||||||
root_domain = ".web.garage"
|
|
||||||
index = "index.html"
|
|
||||||
|
|
||||||
[k2v_api]
|
|
||||||
api_bind_addr = "0.0.0.0:3904"
|
|
||||||
|
|
||||||
[admin]
|
|
||||||
api_bind_addr = "0.0.0.0:3903"
|
|
||||||
admin_token = "${ADMIN_TOKEN}"
|
|
||||||
metrics_token = "${METRICS_TOKEN}"
|
|
||||||
EOF
|
|
||||||
msg_ok "Configured Garage"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<'EOF' >/etc/init.d/garage
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
name="Garage Object Storage"
|
|
||||||
command="/usr/local/bin/garage"
|
|
||||||
command_args="server"
|
|
||||||
command_background="yes"
|
|
||||||
pidfile="/run/garage.pid"
|
|
||||||
depend() {
|
|
||||||
need net
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod +x /etc/init.d/garage
|
|
||||||
$STD rc-update add garage default
|
|
||||||
$STD rc-service garage restart || rc-service garage start
|
|
||||||
msg_ok "Service active"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/TwiN/gatus
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
ca-certificates \
|
|
||||||
libcap-setcap
|
|
||||||
$STD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community go
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/TwiN/gatus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
msg_info "Installing gatus v${RELEASE}"
|
|
||||||
temp_file=$(mktemp)
|
|
||||||
mkdir -p /opt/gatus
|
|
||||||
curl -fsSL "https://github.com/TwiN/gatus/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
|
||||||
tar zxf "$temp_file" --strip-components=1 -C /opt/gatus
|
|
||||||
cd /opt/gatus
|
|
||||||
$STD go mod tidy
|
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
|
|
||||||
setcap CAP_NET_RAW+ep gatus
|
|
||||||
mv config.yaml config
|
|
||||||
echo "${RELEASE}" >/opt/gatus_version.txt
|
|
||||||
msg_ok "Installed gatus v${RELEASE}"
|
|
||||||
|
|
||||||
msg_info "Enabling gatus Service"
|
|
||||||
cat <<EOF >/etc/init.d/gatus
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
description="gatus Service"
|
|
||||||
directory="/opt/gatus"
|
|
||||||
command="/opt/gatus/gatus"
|
|
||||||
command_args=""
|
|
||||||
command_background="true"
|
|
||||||
command_user="root"
|
|
||||||
pidfile="/var/run/gatus.pid"
|
|
||||||
|
|
||||||
export GATUS_CONFIG_PATH=""
|
|
||||||
export GATUS_LOG_LEVEL="INFO"
|
|
||||||
export PORT="8080"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/gatus
|
|
||||||
$STD rc-update add gatus default
|
|
||||||
msg_ok "Enabled gatus Service"
|
|
||||||
|
|
||||||
msg_info "Starting gatus"
|
|
||||||
$STD service gatus start
|
|
||||||
msg_ok "Started gatus"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -f "$temp_file"
|
|
||||||
$STD apk cache clean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://gitea.io/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Gitea"
|
|
||||||
$STD apk add --no-cache gitea
|
|
||||||
msg_ok "Installed Gitea"
|
|
||||||
|
|
||||||
msg_info "Enabling Gitea Service"
|
|
||||||
$STD rc-update add gitea default
|
|
||||||
msg_ok "Enabled Gitea Service"
|
|
||||||
|
|
||||||
msg_info "Starting Gitea"
|
|
||||||
$STD service gitea start
|
|
||||||
msg_ok "Started Gitea"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://grafana.com/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Grafana"
|
|
||||||
$STD apk add grafana
|
|
||||||
$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/grafana
|
|
||||||
$STD rc-service grafana start
|
|
||||||
$STD rc-update add grafana default
|
|
||||||
msg_ok "Installed Grafana"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/nearai/ironclaw
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add openssl dbus gnome-keyring
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing PostgreSQL"
|
|
||||||
$STD apk add postgresql17 postgresql17-openrc postgresql-pgvector postgresql-common
|
|
||||||
$STD rc-service postgresql setup
|
|
||||||
$STD rc-update add postgresql default
|
|
||||||
$STD rc-service postgresql start
|
|
||||||
msg_ok "Installed PostgreSQL"
|
|
||||||
|
|
||||||
msg_info "Setting up Database"
|
|
||||||
PG_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
|
||||||
$STD su -s /bin/sh postgres -c "psql -c \"CREATE ROLE ironclaw WITH LOGIN PASSWORD '${PG_PASS}';\""
|
|
||||||
$STD su -s /bin/sh postgres -c "psql -c \"CREATE DATABASE ironclaw WITH OWNER ironclaw;\""
|
|
||||||
$STD su -s /bin/sh postgres -c "psql -d ironclaw -c \"CREATE EXTENSION IF NOT EXISTS vector;\""
|
|
||||||
msg_ok "Set up Database"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "ironclaw-v0.29.1" "/usr/local/bin" \
|
|
||||||
"ironclaw-$(uname -m)-unknown-linux-musl.tar.gz"
|
|
||||||
chmod +x /usr/local/bin/ironclaw
|
|
||||||
|
|
||||||
msg_info "Configuring Environment"
|
|
||||||
GATEWAY_TOKEN=$(openssl rand -hex 32)
|
|
||||||
mkdir -p /root/.ironclaw
|
|
||||||
cat <<EOF >/root/.ironclaw/gateway.creds
|
|
||||||
Gateway-Token
|
|
||||||
Token: $GATEWAY_TOKEN
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkdir -p /root/.ironclaw
|
|
||||||
cat <<EOF >/root/.ironclaw/.env
|
|
||||||
DATABASE_BACKEND=postgres
|
|
||||||
DATABASE_URL=postgresql://ironclaw:${PG_PASS}@localhost:5432/ironclaw?sslmode=disable
|
|
||||||
GATEWAY_ENABLED=true
|
|
||||||
GATEWAY_HOST=0.0.0.0
|
|
||||||
GATEWAY_PORT=3000
|
|
||||||
GATEWAY_AUTH_TOKEN=${GATEWAY_TOKEN}
|
|
||||||
CLI_ENABLED=false
|
|
||||||
RUST_LOG=ironclaw=info,tower_http=info
|
|
||||||
EOF
|
|
||||||
chmod 600 /root/.ironclaw/.env
|
|
||||||
msg_ok "Configured Environment"
|
|
||||||
|
|
||||||
msg_info "Configuring IronClaw"
|
|
||||||
# Set values in the database since it is typically the true source of truth and ensures values are set correctly on first run before the service starts.
|
|
||||||
/usr/local/bin/ironclaw --no-onboard config set database_backend postgres >/dev/null
|
|
||||||
/usr/local/bin/ironclaw --no-onboard config set database_url "postgresql://ironclaw:${PG_PASS}@localhost:5432/ironclaw?sslmode=disable" >/dev/null
|
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_enabled true >/dev/null
|
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_host 0.0.0.0 >/dev/null
|
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_port 3000 >/dev/null
|
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_auth_token "${GATEWAY_TOKEN}" >/dev/null
|
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.cli_enabled false >/dev/null
|
|
||||||
/usr/local/bin/ironclaw --no-onboard config set secrets_master_key_source none >/dev/null
|
|
||||||
# Running ironclaw defaults to use env for secrets and creates this entry, but we want to set that during onboard.
|
|
||||||
sleep 5
|
|
||||||
sed -i '/SECRETS_MASTER_KEY/d' /root/.ironclaw/.env
|
|
||||||
msg_ok "Configured IronClaw"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<EOF >/etc/init.d/ironclaw
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
|
|
||||||
name="IronClaw"
|
|
||||||
description="IronClaw AI Agent"
|
|
||||||
command="/usr/bin/dbus-run-session"
|
|
||||||
command_args="/usr/local/bin/ironclaw"
|
|
||||||
command_background=true
|
|
||||||
pidfile="/run/ironclaw.pid"
|
|
||||||
directory="/root"
|
|
||||||
supervise_daemon_args="--env-file /root/.ironclaw/.env"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need net postgresql
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/ironclaw
|
|
||||||
$STD rc-update add ironclaw default
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
|
||||||
# Author: hoholms
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/grafana/loki
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Loki"
|
|
||||||
$STD apk add loki
|
|
||||||
$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/loki
|
|
||||||
mkdir -p /var/lib/loki/{chunks,boltdb-shipper-active,boltdb-shipper-cache}
|
|
||||||
chown -R loki:grafana /var/lib/loki
|
|
||||||
mkdir -p /var/log/loki
|
|
||||||
chown -R loki:grafana /var/log/loki
|
|
||||||
cat <<EOF >/etc/loki/loki-local-config.yaml
|
|
||||||
auth_enabled: false
|
|
||||||
|
|
||||||
server:
|
|
||||||
http_listen_port: 3100
|
|
||||||
log_level: info
|
|
||||||
|
|
||||||
common:
|
|
||||||
instance_addr: 127.0.0.1
|
|
||||||
path_prefix: /var/lib/loki
|
|
||||||
storage:
|
|
||||||
filesystem:
|
|
||||||
chunks_directory: /var/lib/loki/chunks
|
|
||||||
rules_directory: /var/lib/loki/rules
|
|
||||||
replication_factor: 1
|
|
||||||
ring:
|
|
||||||
kvstore:
|
|
||||||
store: inmemory
|
|
||||||
|
|
||||||
schema_config:
|
|
||||||
configs:
|
|
||||||
- from: 2020-10-24
|
|
||||||
store: tsdb
|
|
||||||
object_store: filesystem
|
|
||||||
schema: v13
|
|
||||||
index:
|
|
||||||
prefix: index_
|
|
||||||
period: 24h
|
|
||||||
|
|
||||||
query_range:
|
|
||||||
results_cache:
|
|
||||||
cache:
|
|
||||||
embedded_cache:
|
|
||||||
enabled: true
|
|
||||||
max_size_mb: 100
|
|
||||||
|
|
||||||
limits_config:
|
|
||||||
metric_aggregation_enabled: true
|
|
||||||
|
|
||||||
ruler:
|
|
||||||
alertmanager_url: http://localhost:9093
|
|
||||||
EOF
|
|
||||||
chown loki:grafana /etc/loki/loki-local-config.yaml
|
|
||||||
chmod 644 /etc/loki/loki-local-config.yaml
|
|
||||||
echo "output_log=\"\${output_log:-/var/log/loki/output.log}\"" >> /etc/init.d/loki
|
|
||||||
echo "error_log=\"\${error_log:-/var/log/loki/error.log}\"" >> /etc/init.d/loki
|
|
||||||
echo "start_stop_daemon_args=\"\${SSD_OPTS} -1 \${output_log} -2 \${error_log}\"" >> /etc/init.d/loki
|
|
||||||
$STD rc-update add loki default
|
|
||||||
$STD rc-service loki start
|
|
||||||
msg_ok "Installed Loki"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://mariadb.org/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing MariaDB"
|
|
||||||
$STD apk add --no-cache mariadb mariadb-client
|
|
||||||
$STD rc-update add mariadb default
|
|
||||||
msg_ok "Installed MariaDB"
|
|
||||||
|
|
||||||
msg_info "Configuring MariaDB"
|
|
||||||
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql >/dev/null 2>&1
|
|
||||||
$STD rc-service mariadb start
|
|
||||||
msg_ok "MariaDB Configured"
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
|
|
||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
|
||||||
msg_info "Installing Adminer and dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
lighttpd \
|
|
||||||
lighttpd-openrc \
|
|
||||||
php83 \
|
|
||||||
php83-cgi \
|
|
||||||
php83-common \
|
|
||||||
php83-curl \
|
|
||||||
php83-gd \
|
|
||||||
php83-mbstring \
|
|
||||||
php83-mysqli \
|
|
||||||
php83-mysqlnd \
|
|
||||||
php83-openssl \
|
|
||||||
php83-zip \
|
|
||||||
php83-session \
|
|
||||||
jq
|
|
||||||
|
|
||||||
sed -i 's|# *include "mod_fastcgi.conf"|include "mod_fastcgi.conf"|' /etc/lighttpd/lighttpd.conf
|
|
||||||
sed -i 's|/usr/bin/php-cgi|/usr/bin/php-cgi83|g' /etc/lighttpd/mod_fastcgi.conf
|
|
||||||
mkdir -p /var/www/localhost/htdocs
|
|
||||||
ADMINER_VERSION=$(curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/^v//')
|
|
||||||
curl -fsSL "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php" -o /var/www/localhost/htdocs/adminer.php
|
|
||||||
chown lighttpd:lighttpd /var/www/localhost/htdocs/adminer.php
|
|
||||||
chmod 755 /var/www/localhost/htdocs/adminer.php
|
|
||||||
msg_ok "Adminer Installed"
|
|
||||||
|
|
||||||
msg_info "Starting Lighttpd"
|
|
||||||
$STD rc-update add lighttpd default
|
|
||||||
$STD rc-service lighttpd restart
|
|
||||||
msg_ok "Lighttpd Started"
|
|
||||||
fi
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://nodered.org/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
git \
|
|
||||||
nodejs \
|
|
||||||
npm
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Creating Node-RED User"
|
|
||||||
adduser -D -H -s /sbin/nologin -G users nodered
|
|
||||||
msg_ok "Created Node-RED User"
|
|
||||||
|
|
||||||
msg_info "Installing Node-RED"
|
|
||||||
$STD npm install -g --unsafe-perm node-red
|
|
||||||
msg_ok "Installed Node-RED"
|
|
||||||
|
|
||||||
msg_info "Creating /home/nodered"
|
|
||||||
mkdir -p /home/nodered
|
|
||||||
chown -R nodered:users /home/nodered
|
|
||||||
chmod 750 /home/nodered
|
|
||||||
msg_ok "Created /home/nodered"
|
|
||||||
|
|
||||||
msg_info "Creating Node-RED Service"
|
|
||||||
service_path="/etc/init.d/nodered"
|
|
||||||
|
|
||||||
echo '#!/sbin/openrc-run
|
|
||||||
description="Node-RED Service"
|
|
||||||
|
|
||||||
command="/usr/local/bin/node-red"
|
|
||||||
command_args="--max-old-space-size=128 -v"
|
|
||||||
command_user="nodered"
|
|
||||||
pidfile="/var/run/nodered.pid"
|
|
||||||
command_background="yes"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}' >$service_path
|
|
||||||
|
|
||||||
chmod +x $service_path
|
|
||||||
msg_ok "Created Node-RED Service"
|
|
||||||
|
|
||||||
msg_info "Starting Node-RED"
|
|
||||||
$STD rc-update add nodered
|
|
||||||
$STD rc-service nodered start
|
|
||||||
msg_ok "Started Node-RED"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: cobalt (cobaltgit)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://ntfy.sh/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing ntfy"
|
|
||||||
$STD apk add --no-cache ntfy ntfy-openrc libcap
|
|
||||||
sed -i '/^listen-http/s/^\(.*\)$/#\1\n/' /etc/ntfy/server.yml
|
|
||||||
setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy
|
|
||||||
$STD rc-update add ntfy default
|
|
||||||
$STD service ntfy start
|
|
||||||
msg_ok "Installed ntfy"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.postgresql.org/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17): " ver
|
|
||||||
[[ $ver =~ ^(15|16|17)$ ]] || { echo "Invalid version"; exit 64; }
|
|
||||||
|
|
||||||
msg_info "Installing PostgreSQL ${ver}"
|
|
||||||
$STD apk add --no-cache postgresql${ver} postgresql${ver}-contrib postgresql${ver}-openrc sudo
|
|
||||||
msg_ok "Installed PostgreSQL ${ver}"
|
|
||||||
|
|
||||||
msg_info "Enabling PostgreSQL Service"
|
|
||||||
$STD rc-update add postgresql default
|
|
||||||
msg_ok "Enabled PostgreSQL Service"
|
|
||||||
|
|
||||||
msg_info "Starting PostgreSQL"
|
|
||||||
$STD rc-service postgresql start
|
|
||||||
msg_ok "Started PostgreSQL"
|
|
||||||
|
|
||||||
msg_info "Configuring PostgreSQL for External Access"
|
|
||||||
conf_file="/etc/postgresql${ver}/postgresql.conf"
|
|
||||||
hba_file="/etc/postgresql${ver}/pg_hba.conf"
|
|
||||||
sed -i 's/^#listen_addresses =.*/listen_addresses = '\''*'\''/' "$conf_file"
|
|
||||||
sed -i '/^host\s\+all\s\+all\s\+127.0.0.1\/32\s\+md5/ s/.*/host all all 0.0.0.0\/0 md5/' "$hba_file"
|
|
||||||
$STD rc-service postgresql restart
|
|
||||||
msg_ok "Configured and Restarted PostgreSQL"
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
|
|
||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
|
||||||
msg_info "Installing Adminer and dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
lighttpd \
|
|
||||||
lighttpd-openrc \
|
|
||||||
php83 \
|
|
||||||
php83-cgi \
|
|
||||||
php83-common \
|
|
||||||
php83-curl \
|
|
||||||
php83-gd \
|
|
||||||
php83-mbstring \
|
|
||||||
php83-pdo \
|
|
||||||
php83-pgsql \
|
|
||||||
php83-openssl \
|
|
||||||
php83-zip \
|
|
||||||
php83-session \
|
|
||||||
jq
|
|
||||||
|
|
||||||
sed -i 's|# *include "mod_fastcgi.conf"|include "mod_fastcgi.conf"|' /etc/lighttpd/lighttpd.conf
|
|
||||||
sed -i 's|/usr/bin/php-cgi|/usr/bin/php-cgi83|g' /etc/lighttpd/mod_fastcgi.conf
|
|
||||||
mkdir -p /var/www/localhost/htdocs
|
|
||||||
ADMINER_VERSION=$(curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/^v//')
|
|
||||||
curl -fsSL "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php" -o /var/www/localhost/htdocs/adminer.php
|
|
||||||
chown lighttpd:lighttpd /var/www/localhost/htdocs/adminer.php
|
|
||||||
chmod 755 /var/www/localhost/htdocs/adminer.php
|
|
||||||
msg_ok "Adminer Installed"
|
|
||||||
|
|
||||||
msg_info "Starting Lighttpd"
|
|
||||||
$STD rc-update add lighttpd default
|
|
||||||
$STD rc-service lighttpd restart
|
|
||||||
msg_ok "Lighttpd Started"
|
|
||||||
fi
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://prometheus.io/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Prometheus"
|
|
||||||
$STD apk add --no-cache prometheus
|
|
||||||
msg_ok "Installed Prometheus"
|
|
||||||
|
|
||||||
msg_info "Enabling Prometheus Service"
|
|
||||||
$STD rc-update add prometheus default
|
|
||||||
msg_ok "Enabled Prometheus Service"
|
|
||||||
|
|
||||||
msg_info "Starting Prometheus"
|
|
||||||
$STD service prometheus start
|
|
||||||
msg_ok "Started Prometheus"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/rclone/rclone
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
apache2-utils fuse3
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing rclone"
|
|
||||||
temp_file=$(mktemp)
|
|
||||||
mkdir -p /opt/rclone
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-$(arch_resolve).zip" -o "$temp_file"
|
|
||||||
$STD unzip -j "$temp_file" '*/**' -d /opt/rclone
|
|
||||||
cd /opt/rclone
|
|
||||||
RCLONE_PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16)
|
|
||||||
$STD htpasswd -cb -B /opt/login.pwd admin "$RCLONE_PASSWORD"
|
|
||||||
cat <<EOF >~/rclone.creds
|
|
||||||
rclone-Credentials
|
|
||||||
rclone User Name: admin
|
|
||||||
rclone Password: $RCLONE_PASSWORD
|
|
||||||
EOF
|
|
||||||
echo "${RELEASE}" >/opt/rclone_version.txt
|
|
||||||
rm -f "$temp_file"
|
|
||||||
msg_ok "Installed rclone"
|
|
||||||
|
|
||||||
msg_info "Enabling rclone Service"
|
|
||||||
cat <<EOF >/etc/init.d/rclone
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
description="rclone Service"
|
|
||||||
command="/opt/rclone/rclone"
|
|
||||||
command_args="rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/login.pwd"
|
|
||||||
command_background="true"
|
|
||||||
command_user="root"
|
|
||||||
pidfile="/var/run/rclone.pid"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/rclone
|
|
||||||
$STD rc-update add rclone default
|
|
||||||
msg_ok "Enabled rclone Service"
|
|
||||||
|
|
||||||
msg_info "Starting rclone"
|
|
||||||
$STD service rclone start
|
|
||||||
msg_ok "Started rclone"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -rf "$temp_file"
|
|
||||||
$STD apk cache clean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://redis.io/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Redis"
|
|
||||||
$STD apk add redis
|
|
||||||
$STD sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf
|
|
||||||
$STD rc-update add redis default
|
|
||||||
$STD rc-service redis start
|
|
||||||
msg_ok "Installed Redis"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,123 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/rustdesk/rustdesk-server
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/lejianwen/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
|
||||||
msg_info "Installing RustDesk Server v${RELEASE}"
|
|
||||||
temp_file1=$(mktemp)
|
|
||||||
ARCH=$(arch_resolve "amd64" "arm64v8")
|
|
||||||
curl -fsSL "https://github.com/lejianwen/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-linux-${ARCH}.zip" -o "$temp_file1"
|
|
||||||
$STD unzip "$temp_file1"
|
|
||||||
mv "$ARCH" /opt/rustdesk-server
|
|
||||||
mkdir -p /root/.config/rustdesk
|
|
||||||
cd /opt/rustdesk-server
|
|
||||||
./rustdesk-utils genkeypair >/tmp/rustdesk_keys.txt
|
|
||||||
grep "Public Key" /tmp/rustdesk_keys.txt | awk '{print $3}' >/root/.config/rustdesk/id_ed25519.pub
|
|
||||||
grep "Secret Key" /tmp/rustdesk_keys.txt | awk '{print $3}' >/root/.config/rustdesk/id_ed25519
|
|
||||||
chmod 600 /root/.config/rustdesk/id_ed25519
|
|
||||||
chmod 644 /root/.config/rustdesk/id_ed25519.pub
|
|
||||||
rm /tmp/rustdesk_keys.txt
|
|
||||||
echo "${RELEASE}" >~/.rustdesk-server
|
|
||||||
msg_ok "Installed RustDesk Server v${RELEASE}"
|
|
||||||
|
|
||||||
APIRELEASE=$(curl -s https://api.github.com/repos/lejianwen/rustdesk-api/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
msg_info "Installing RustDesk API v${APIRELEASE}"
|
|
||||||
temp_file2=$(mktemp)
|
|
||||||
curl -fsSL "https://github.com/lejianwen/rustdesk-api/releases/download/v${APIRELEASE}/linux-$(arch_resolve).tar.gz" -o "$temp_file2"
|
|
||||||
$STD tar zxvf "$temp_file2"
|
|
||||||
mv release /opt/rustdesk-api
|
|
||||||
cd /opt/rustdesk-api
|
|
||||||
ADMINPASS=$(head -c 16 /dev/urandom | xxd -p -c 16)
|
|
||||||
$STD ./apimain reset-admin-pwd "$ADMINPASS"
|
|
||||||
cat <<EOF >~/rustdesk.creds
|
|
||||||
RustDesk WebUI
|
|
||||||
|
|
||||||
Username: admin
|
|
||||||
Password: $ADMINPASS
|
|
||||||
EOF
|
|
||||||
echo "${APIRELEASE}" >~/.rustdesk-api
|
|
||||||
msg_ok "Installed RustDesk API v${APIRELEASE}"
|
|
||||||
|
|
||||||
msg_info "Enabling RustDesk Server Services"
|
|
||||||
cat <<EOF >/etc/init.d/rustdesk-server-hbbs
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
description="RustDesk HBBS Service"
|
|
||||||
directory="/opt/rustdesk-server"
|
|
||||||
command="/opt/rustdesk-server/hbbs"
|
|
||||||
command_args=""
|
|
||||||
command_background="true"
|
|
||||||
command_user="root"
|
|
||||||
pidfile="/var/run/rustdesk-server-hbbs.pid"
|
|
||||||
output_log="/var/log/rustdesk-hbbs.log"
|
|
||||||
error_log="/var/log/rustdesk-hbbs.err"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/init.d/rustdesk-server-hbbr
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
description="RustDesk HBBR Service"
|
|
||||||
directory="/opt/rustdesk-server"
|
|
||||||
command="/opt/rustdesk-server/hbbr"
|
|
||||||
command_args=""
|
|
||||||
command_background="true"
|
|
||||||
command_user="root"
|
|
||||||
pidfile="/var/run/rustdesk-server-hbbr.pid"
|
|
||||||
output_log="/var/log/rustdesk-hbbr.log"
|
|
||||||
error_log="/var/log/rustdesk-hbbr.err"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/init.d/rustdesk-api
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
description="RustDesk API Service"
|
|
||||||
directory="/opt/rustdesk-api"
|
|
||||||
command="/opt/rustdesk-api/apimain"
|
|
||||||
command_args=""
|
|
||||||
command_background="true"
|
|
||||||
command_user="root"
|
|
||||||
pidfile="/var/run/rustdesk-api.pid"
|
|
||||||
output_log="/var/log/rustdesk-api.log"
|
|
||||||
error_log="/var/log/rustdesk-api.err"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/rustdesk-server-hbbs
|
|
||||||
chmod +x /etc/init.d/rustdesk-server-hbbr
|
|
||||||
chmod +x /etc/init.d/rustdesk-api
|
|
||||||
$STD rc-update add rustdesk-server-hbbs default
|
|
||||||
$STD rc-update add rustdesk-server-hbbr default
|
|
||||||
$STD rc-update add rustdesk-api default
|
|
||||||
msg_ok "Enabled RustDesk Server Services"
|
|
||||||
|
|
||||||
msg_info "Starting RustDesk Server"
|
|
||||||
$STD service rustdesk-server-hbbs start
|
|
||||||
$STD service rustdesk-server-hbbr start
|
|
||||||
$STD service rustdesk-api start
|
|
||||||
msg_ok "Started RustDesk Server"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -f "$temp_file1" "$temp_file2"
|
|
||||||
$STD apk cache clean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/orhun/rustypaste
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing RustyPaste"
|
|
||||||
$STD apk add --no-cache rustypaste --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
msg_ok "Installed RustyPaste"
|
|
||||||
|
|
||||||
msg_info "Configuring RustyPaste"
|
|
||||||
mkdir -p /var/lib/rustypaste
|
|
||||||
sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' /etc/rustypaste/config.toml
|
|
||||||
msg_ok "Configured RustyPaste"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<'EOF' >/etc/init.d/rustypaste
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
|
|
||||||
name="rustypaste"
|
|
||||||
description="RustyPaste - A minimal file upload/pastebin service"
|
|
||||||
command="/usr/bin/rustypaste"
|
|
||||||
command_args=""
|
|
||||||
command_user="root"
|
|
||||||
command_background=true
|
|
||||||
pidfile="/run/${RC_SVCNAME}.pid"
|
|
||||||
directory="/var/lib/rustypaste"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need net
|
|
||||||
after firewall
|
|
||||||
}
|
|
||||||
|
|
||||||
start_pre() {
|
|
||||||
export CONFIG=/etc/rustypaste/config.toml
|
|
||||||
checkpath --directory --owner root:root --mode 0755 /var/lib/rustypaste
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/rustypaste
|
|
||||||
$STD rc-update add rustypaste default
|
|
||||||
$STD rc-service rustypaste start
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://syncthing.net/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Setup Syncthing"
|
|
||||||
$STD apk add --no-cache syncthing
|
|
||||||
rc-service syncthing start
|
|
||||||
sleep 3
|
|
||||||
rc-service syncthing stop
|
|
||||||
sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /var/lib/syncthing/.local/state/syncthing/config.xml
|
|
||||||
msg_ok "Setup Syncthing"
|
|
||||||
|
|
||||||
msg_info "Enabling Syncthing Service"
|
|
||||||
$STD rc-update add syncthing default
|
|
||||||
msg_ok "Enabled Syncthing Service"
|
|
||||||
|
|
||||||
msg_info "Starting Syncthing"
|
|
||||||
$STD rc-service syncthing start
|
|
||||||
msg_ok "Started Syncthing"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: tremor021 (Slaviša Arežina)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://teamspeak.com/en/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
ca-certificates \
|
|
||||||
libstdc++ \
|
|
||||||
libc6-compat
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL https://teamspeak.com/en/downloads/#server | sed -n 's/.*teamspeak3-server_linux_amd64-\([0-9.]*[0-9]\).*/\1/p' | awk 'NR==1')
|
|
||||||
msg_info "Installing Teamspeak Server v${RELEASE}"
|
|
||||||
mkdir -p /opt/teamspeak-server
|
|
||||||
cd /opt/teamspeak-server
|
|
||||||
curl -fsSL "https://files.teamspeak-services.com/releases/server/${RELEASE}/teamspeak3-server_linux_amd64-${RELEASE}.tar.bz2" -o ts3server.tar.bz2
|
|
||||||
tar xf ts3server.tar.bz2 --strip-components=1
|
|
||||||
mkdir -p logs data lib
|
|
||||||
mv *.so lib
|
|
||||||
touch data/ts3server.sqlitedb data/query_ip_blacklist.txt data/query_ip_whitelist.txt .ts3server_license_accepted
|
|
||||||
echo "${RELEASE}" >~/.teamspeak-server
|
|
||||||
msg_ok "Installed TeamSpeak Server v${RELEASE}"
|
|
||||||
|
|
||||||
msg_info "Enabling TeamSpeak Server Service"
|
|
||||||
cat <<EOF >/etc/init.d/teamspeak
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
|
|
||||||
name="TeamSpeak Server"
|
|
||||||
description="TeamSpeak 3 Server"
|
|
||||||
command="/opt/teamspeak-server/ts3server_startscript.sh"
|
|
||||||
command_args="start"
|
|
||||||
output_log="/var/log/teamspeak.out.log"
|
|
||||||
error_log="/var/log/teamspeak.err.log"
|
|
||||||
command_background=true
|
|
||||||
pidfile="/run/teamspeak-server.pid"
|
|
||||||
directory="/opt/teamspeak-server"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need net
|
|
||||||
use dns
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/teamspeak
|
|
||||||
$STD rc-update add teamspeak default
|
|
||||||
msg_ok "Enabled TeamSpeak Server Service"
|
|
||||||
|
|
||||||
msg_info "Starting TeamSpeak Server"
|
|
||||||
$STD service teamspeak start
|
|
||||||
msg_ok "Started TeamSpeak Server"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
rm -r ts3server.tar.bz* LICENSE* CHANGELOG doc serverquerydocs tsdns redist
|
|
||||||
$STD apk cache clean
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021) | Co-Author: Stavros (steveiliop56)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/tinyauthapp/tinyauth
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add --no-cache openssl apache2-utils
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Tinyauth"
|
|
||||||
mkdir -p /opt/tinyauth
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/tinyauthapp/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
curl -fsSL "https://github.com/tinyauthapp/tinyauth/releases/download/v${RELEASE}/tinyauth-$(arch_resolve)" -o /opt/tinyauth/tinyauth
|
|
||||||
chmod +x /opt/tinyauth/tinyauth
|
|
||||||
PASS=$(openssl rand -base64 8 | tr -dc 'a-zA-Z0-9' | head -c 8)
|
|
||||||
USER=$(htpasswd -Bbn "tinyauth" "${PASS}")
|
|
||||||
|
|
||||||
cat <<EOF >/opt/tinyauth/credentials.txt
|
|
||||||
Tinyauth Credentials
|
|
||||||
Username: tinyauth
|
|
||||||
Password: ${PASS}
|
|
||||||
EOF
|
|
||||||
echo "${RELEASE}" >~/.tinyauth
|
|
||||||
msg_ok "Installed Tinyauth"
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url
|
|
||||||
|
|
||||||
cat <<EOF >/opt/tinyauth/.env
|
|
||||||
TINYAUTH_DATABASE_PATH=/opt/tinyauth/database.db
|
|
||||||
TINYAUTH_AUTH_USERS='${USER}'
|
|
||||||
TINYAUTH_APPURL=${app_url}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<'EOF' >/etc/init.d/tinyauth
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
description="Tinyauth Service"
|
|
||||||
|
|
||||||
set -a
|
|
||||||
ENV_FILE="/opt/tinyauth/.env"
|
|
||||||
[ -f "$ENV_FILE" ] && . "$ENV_FILE"
|
|
||||||
set +a
|
|
||||||
|
|
||||||
command="/opt/tinyauth/tinyauth"
|
|
||||||
directory="/opt/tinyauth"
|
|
||||||
command_user="root"
|
|
||||||
command_background="true"
|
|
||||||
pidfile="/var/run/tinyauth.pid"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/tinyauth
|
|
||||||
$STD rc-update add tinyauth default
|
|
||||||
msg_ok "Enabled Tinyauth Service"
|
|
||||||
|
|
||||||
msg_info "Starting Tinyauth"
|
|
||||||
$STD service tinyauth start
|
|
||||||
msg_ok "Started Tinyauth"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/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 apk add ca-certificates
|
|
||||||
$STD update-ca-certificates
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Traefik"
|
|
||||||
$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
msg_ok "Installed Traefik"
|
|
||||||
|
|
||||||
read -p "${TAB3}Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui
|
|
||||||
if [[ "$enable_webui" =~ ^[Yy]$ ]]; then
|
|
||||||
msg_info "Configuring Traefik WebUI"
|
|
||||||
sed -i 's/localhost//g' /etc/traefik/traefik.yaml
|
|
||||||
msg_ok "Configured Traefik WebUI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Enabling and starting Traefik service"
|
|
||||||
$STD rc-update add traefik default
|
|
||||||
sed -i '/^command=.*/i directory="/etc/traefik"' /etc/init.d/traefik
|
|
||||||
$STD rc-service traefik start
|
|
||||||
msg_ok "Traefik service started"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://transmissionbt.com/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Transmission"
|
|
||||||
$STD apk add --no-cache transmission-cli transmission-daemon
|
|
||||||
$STD rc-service transmission-daemon start
|
|
||||||
sleep 5
|
|
||||||
$STD rc-service transmission-daemon stop
|
|
||||||
sed -i '{s/"rpc-whitelist-enabled": true/"rpc-whitelist-enabled": false/g; s/"rpc-host-whitelist-enabled": true,/"rpc-host-whitelist-enabled": false,/g}' /var/lib/transmission/config/settings.json
|
|
||||||
msg_ok "Installed Transmission"
|
|
||||||
|
|
||||||
msg_info "Enabling Transmission Service"
|
|
||||||
$STD rc-update add transmission-daemon default
|
|
||||||
msg_ok "Enabled Transmission Service"
|
|
||||||
|
|
||||||
msg_info "Starting Transmission"
|
|
||||||
$STD rc-service transmission-daemon start
|
|
||||||
msg_ok "Started Transmission"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: pshankinclarke (lazarillo)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://valkey.io/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Valkey"
|
|
||||||
$STD apk add valkey valkey-openrc valkey-cli
|
|
||||||
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
|
|
||||||
|
|
||||||
PASS="$(head -c 100 /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c32)"
|
|
||||||
echo "requirepass $PASS" >>/etc/valkey/valkey.conf
|
|
||||||
echo "$PASS" >~/valkey.creds
|
|
||||||
chmod 600 ~/valkey.creds
|
|
||||||
|
|
||||||
MEMTOTAL_MB=$(free -m | grep ^Mem: | awk '{print $2}')
|
|
||||||
MAXMEMORY_MB=$((MEMTOTAL_MB * 75 / 100))
|
|
||||||
|
|
||||||
cat <<EOF >/etc/valkey/valkey.conf
|
|
||||||
# Memory-optimized settings for small-scale deployments
|
|
||||||
maxmemory ${MAXMEMORY_MB}mb
|
|
||||||
maxmemory-policy allkeys-lru
|
|
||||||
maxmemory-samples 10
|
|
||||||
EOF
|
|
||||||
msg_ok "Installed Valkey"
|
|
||||||
|
|
||||||
# Note: Alpine's valkey package is compiled without TLS support
|
|
||||||
# For TLS, use the Debian-based valkey script instead
|
|
||||||
|
|
||||||
$STD rc-update add valkey default
|
|
||||||
$STD rc-service valkey start
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
|
||||||
# Author: tteck (tteckster) | Co-Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/dani-garcia/vaultwarden
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
openssl \
|
|
||||||
argon2
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Alpine-Vaultwarden"
|
|
||||||
$STD apk add --no-cache vaultwarden
|
|
||||||
sed -i 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden
|
|
||||||
echo -e "export ADMIN_TOKEN=''" >>/etc/conf.d/vaultwarden
|
|
||||||
echo -e "export ROCKET_ADDRESS=0.0.0.0" >>/etc/conf.d/vaultwarden
|
|
||||||
echo -e "export ROCKET_TLS='{certs=\"/etc/ssl/certs/vaultwarden-selfsigned.crt\",key=\"/etc/ssl/private/vaultwarden-selfsigned.key\"}'" >>/etc/conf.d/vaultwarden
|
|
||||||
$STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/vaultwarden-selfsigned.key -out /etc/ssl/certs/vaultwarden-selfsigned.crt -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"
|
|
||||||
chown vaultwarden:vaultwarden /etc/ssl/certs/vaultwarden-selfsigned.crt
|
|
||||||
chown vaultwarden:vaultwarden /etc/ssl/private/vaultwarden-selfsigned.key
|
|
||||||
msg_ok "Installed Alpine-Vaultwarden"
|
|
||||||
|
|
||||||
msg_info "Installing Web-Vault"
|
|
||||||
$STD apk add --no-cache vaultwarden-web-vault
|
|
||||||
msg_ok "Installed Web-Vault"
|
|
||||||
|
|
||||||
msg_info "Starting Alpine-Vaultwarden"
|
|
||||||
$STD rc-service vaultwarden start
|
|
||||||
$STD rc-update add vaultwarden default
|
|
||||||
msg_ok "Started Alpine-Vaultwarden"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.wireguard.com/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add \
|
|
||||||
iptables \
|
|
||||||
openrc
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing WireGuard"
|
|
||||||
$STD apk add --no-cache wireguard-tools
|
|
||||||
if [[ ! -L /etc/init.d/wg-quick.wg0 ]]; then
|
|
||||||
ln -s /etc/init.d/wg-quick /etc/init.d/wg-quick.wg0
|
|
||||||
fi
|
|
||||||
|
|
||||||
private_key=$(wg genkey)
|
|
||||||
cat <<EOF >/etc/wireguard/wg0.conf
|
|
||||||
[Interface]
|
|
||||||
PrivateKey = ${private_key}
|
|
||||||
Address = 10.0.0.1/24
|
|
||||||
SaveConfig = true
|
|
||||||
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
|
|
||||||
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE;
|
|
||||||
ListenPort = 51820
|
|
||||||
EOF
|
|
||||||
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
|
|
||||||
$STD rc-update add sysctl
|
|
||||||
$STD sysctl -p /etc/sysctl.conf
|
|
||||||
msg_ok "Installed WireGuard"
|
|
||||||
|
|
||||||
read -rp "${TAB3}Do you want to install WGDashboard? (y/N): " INSTALL_WGD
|
|
||||||
if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then
|
|
||||||
msg_info "Installing additional dependencies for WGDashboard"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
python3 \
|
|
||||||
py3-pip \
|
|
||||||
git \
|
|
||||||
sudo \
|
|
||||||
musl-dev \
|
|
||||||
linux-headers \
|
|
||||||
gcc \
|
|
||||||
python3-dev
|
|
||||||
msg_ok "Installed additional dependencies for WGDashboard"
|
|
||||||
msg_info "Installing WGDashboard"
|
|
||||||
git clone -q https://github.com/WGDashboard/WGDashboard.git /etc/wgdashboard
|
|
||||||
cd /etc/wgdashboard/src
|
|
||||||
chmod u+x wgd.sh
|
|
||||||
$STD ./wgd.sh install
|
|
||||||
msg_ok "Installed WGDashboard"
|
|
||||||
|
|
||||||
msg_info "Creating Service for WGDashboard"
|
|
||||||
cat <<EOF >/etc/init.d/wg-dashboard
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
|
|
||||||
description="WireGuard Dashboard Service"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need net
|
|
||||||
after firewall
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
ebegin "Starting WGDashboard"
|
|
||||||
cd /etc/wgdashboard/src/
|
|
||||||
./wgd.sh start &
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping WGDashboard"
|
|
||||||
pkill -f "wgd.sh"
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/wg-dashboard
|
|
||||||
$STD rc-update add wg-dashboard default
|
|
||||||
$STD rc-service wg-dashboard start
|
|
||||||
msg_ok "Created Service for WGDashboard"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
|
||||||
$STD rc-update add wg-quick.wg0 default
|
|
||||||
$STD rc-service wg-quick.wg0 start
|
|
||||||
msg_ok "Started Services"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 tteck
|
|
||||||
# Author: tteck (tteckster)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://www.zigbee2mqtt.io/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Alpine-Zigbee2MQTT"
|
|
||||||
mkdir -p /root/.z2m /etc/zigbee2mqtt
|
|
||||||
$STD apk add zigbee2mqtt
|
|
||||||
ln -s /etc/zigbee2mqtt/ /root/.z2m
|
|
||||||
chown -R root:root /etc/zigbee2mqtt /root/.z2m
|
|
||||||
sed -i -e 's/#datadir="\/var\/lib\/zigbee2mqtt"/datadir="\/etc\/zigbee2mqtt"/' -e 's/#command_user="zigbee2mqtt"/command_user="root"/' /etc/conf.d/zigbee2mqtt
|
|
||||||
$STD rc-update add zigbee2mqtt
|
|
||||||
$STD rc-service zigbee2mqtt restart
|
|
||||||
msg_ok "Installed Alpine-Zigbee2MQTT"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -13,43 +13,44 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
setup_deb_based() {
|
||||||
$STD apt install -y \
|
msg_info "Installing Dependencies"
|
||||||
iproute2 \
|
$STD apt install -y \
|
||||||
gcc \
|
iproute2 \
|
||||||
musl-dev
|
gcc \
|
||||||
msg_ok "Installed Dependencies"
|
musl-dev
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="16" setup_postgresql
|
PG_VERSION="16" setup_postgresql
|
||||||
PG_DB_NAME="bitmagnet" PG_DB_USER="bitmagnet" setup_postgresql_db
|
PG_DB_NAME="bitmagnet" PG_DB_USER="bitmagnet" setup_postgresql_db
|
||||||
setup_go
|
setup_go
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball"
|
fetch_and_deploy_gh_release "bitmagnet" "bitmagnet-io/bitmagnet" "tarball"
|
||||||
RELEASE=$(cat ~/.bitmagnet)
|
RELEASE=$(cat ~/.bitmagnet)
|
||||||
|
|
||||||
msg_info "Configuring bitmagnet"
|
msg_info "Configuring bitmagnet"
|
||||||
cd /opt/bitmagnet
|
cd /opt/bitmagnet
|
||||||
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=v${RELEASE}"
|
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=v${RELEASE}"
|
||||||
chmod +x bitmagnet
|
chmod +x bitmagnet
|
||||||
msg_ok "Configured bitmagnet"
|
msg_ok "Configured bitmagnet"
|
||||||
|
|
||||||
read -r -p "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
|
read -r -p "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
|
||||||
|
|
||||||
cat <<EOF >/etc/bitmagnet.env
|
cat <<EOF >/etc/bitmagnet.env
|
||||||
POSTGRES_HOST=localhost
|
POSTGRES_HOST=localhost
|
||||||
POSTGRES_USER=${PG_DB_USER}
|
POSTGRES_USER=${PG_DB_USER}
|
||||||
POSTGRES_NAME=${PG_DB_NAME}
|
POSTGRES_NAME=${PG_DB_NAME}
|
||||||
POSTGRES_PASSWORD=${PG_DB_PASS}
|
POSTGRES_PASSWORD=${PG_DB_PASS}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ -z "$tmdbapikey" ]; then
|
if [ -z "$tmdbapikey" ]; then
|
||||||
echo "TMDB_ENABLED=false" >>/etc/bitmagnet.env
|
echo "TMDB_ENABLED=false" >>/etc/bitmagnet.env
|
||||||
else
|
else
|
||||||
echo "TMDB_API_KEY=$tmdbapikey" >>/etc/bitmagnet.env
|
echo "TMDB_API_KEY=$tmdbapikey" >>/etc/bitmagnet.env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/bitmagnet-web.service
|
cat <<EOF >/etc/systemd/system/bitmagnet-web.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=bitmagnet Web GUI
|
Description=bitmagnet Web GUI
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
@@ -65,8 +66,78 @@ Restart=on-failure
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now bitmagnet-web
|
systemctl enable -q --now bitmagnet-web
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing dependencies"
|
||||||
|
$STD apk add --no-cache \
|
||||||
|
gcc \
|
||||||
|
musl-dev \
|
||||||
|
git \
|
||||||
|
iproute2-ss \
|
||||||
|
sudo
|
||||||
|
$STD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community go
|
||||||
|
msg_ok "Installed dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing PostgreSQL"
|
||||||
|
$STD apk add --no-cache \
|
||||||
|
postgresql16 \
|
||||||
|
postgresql16-contrib \
|
||||||
|
postgresql16-openrc
|
||||||
|
$STD rc-update add postgresql
|
||||||
|
$STD rc-service postgresql start
|
||||||
|
msg_ok "Installed PostreSQL"
|
||||||
|
|
||||||
|
RELEASE=$(curl -fsSL https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
|
||||||
|
msg_info "Installing bitmagnet v${RELEASE}"
|
||||||
|
mkdir -p /opt/bitmagnet
|
||||||
|
temp_file=$(mktemp)
|
||||||
|
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||||
|
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
|
||||||
|
cd /opt/bitmagnet
|
||||||
|
VREL=v$RELEASE
|
||||||
|
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
|
||||||
|
chmod +x bitmagnet
|
||||||
|
$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'"
|
||||||
|
echo "${RELEASE}" >/opt/bitmagnet_version.txt
|
||||||
|
msg_ok "Installed bitmagnet v${RELEASE}"
|
||||||
|
|
||||||
|
read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
|
||||||
|
|
||||||
|
msg_info "Enabling bitmagnet Service"
|
||||||
|
cat <<EOF >/etc/init.d/bitmagnet
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
description="bitmagnet Service"
|
||||||
|
directory="/opt/bitmagnet"
|
||||||
|
command="/opt/bitmagnet/bitmagnet"
|
||||||
|
command_args="worker run --all"
|
||||||
|
command_background="true"
|
||||||
|
command_user="root"
|
||||||
|
pidfile="/var/run/bitmagnet.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
use net
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
export TMDB_API_KEY="$tmdbapikey"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
chmod +x /etc/init.d/bitmagnet
|
||||||
|
$STD rc-update add bitmagnet default
|
||||||
|
msg_ok "Enabled bitmagnet Service"
|
||||||
|
|
||||||
|
msg_info "Starting bitmagnet"
|
||||||
|
$STD service bitmagnet start
|
||||||
|
msg_ok "Started bitmagnet"
|
||||||
|
|
||||||
|
rm -f "$temp_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+82
-23
@@ -13,32 +13,91 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
setup_deb_based() {
|
||||||
$STD apt install -y \
|
msg_info "Installing Dependencies"
|
||||||
debian-keyring \
|
$STD apt install -y \
|
||||||
debian-archive-keyring \
|
debian-keyring \
|
||||||
apt-transport-https
|
debian-archive-keyring \
|
||||||
msg_ok "Installed Dependencies"
|
apt-transport-https
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Caddy"
|
msg_info "Installing Caddy"
|
||||||
setup_deb822_repo \
|
setup_deb822_repo \
|
||||||
"caddy" \
|
"caddy" \
|
||||||
"https://dl.cloudsmith.io/public/caddy/stable/gpg.key" \
|
"https://dl.cloudsmith.io/public/caddy/stable/gpg.key" \
|
||||||
"https://dl.cloudsmith.io/public/caddy/stable/deb/debian" \
|
"https://dl.cloudsmith.io/public/caddy/stable/deb/debian" \
|
||||||
"any-version"
|
"any-version"
|
||||||
$STD apt install -y caddy
|
$STD apt install -y caddy
|
||||||
msg_ok "Installed Caddy"
|
msg_ok "Installed Caddy"
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
|
read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
setup_go
|
setup_go
|
||||||
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
|
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
|
||||||
|
|
||||||
msg_info "Setup xCaddy"
|
msg_info "Setup xCaddy"
|
||||||
$STD apt install -y git
|
$STD apt install -y git
|
||||||
$STD xcaddy build
|
$STD xcaddy build
|
||||||
msg_ok "Setup xCaddy"
|
msg_ok "Setup xCaddy"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Caddy"
|
||||||
|
$STD apk add --no-cache caddy caddy-openrc
|
||||||
|
cat <<EOF >/etc/caddy/Caddyfile
|
||||||
|
:80 {
|
||||||
|
# Set this path to your site's directory.
|
||||||
|
root * /var/www/html
|
||||||
|
|
||||||
|
# Enable the static file server.
|
||||||
|
file_server
|
||||||
|
|
||||||
|
# Another common task is to set up a reverse proxy:
|
||||||
|
# reverse_proxy localhost:8080
|
||||||
|
|
||||||
|
# Or serve a PHP site through php-fpm:
|
||||||
|
# php_fastcgi localhost:9000
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
mkdir -p /var/www/html
|
||||||
|
cat <<EOF >/var/www/html/index.html
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Caddy works!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Hello Caddy!</h1>
|
||||||
|
<p>For more information, refer to the Caddy <a href="https://caddyserver.com/docs/">documentation</a><p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
msg_ok "Installed Caddy"
|
||||||
|
|
||||||
|
read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
|
||||||
|
msg_info "Setup xCaddy"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.tar.gz" -o "xcaddy_${RELEASE:1}_linux_amd64.tar.gz"
|
||||||
|
$STD tar xzf xcaddy_"${RELEASE:1}"_linux_amd64.tar.gz -C /usr/local/bin xcaddy
|
||||||
|
rm -rf /opt/xcaddy*
|
||||||
|
$STD xcaddy build
|
||||||
|
msg_ok "Setup xCaddy"
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Enabling Caddy Service"
|
||||||
|
$STD rc-update add caddy default
|
||||||
|
msg_ok "Enabled Caddy Service"
|
||||||
|
|
||||||
|
msg_info "Starting Caddy"
|
||||||
|
$STD service caddy start
|
||||||
|
msg_ok "Started Caddy"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+102
-44
@@ -13,64 +13,122 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_github_release "portainer/agent")
|
setup_deb_based() {
|
||||||
|
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_github_release "portainer/agent")
|
||||||
|
|
||||||
setup_docker
|
setup_docker
|
||||||
|
|
||||||
if prompt_confirm "${TAB3}Would you like to install Portainer (UI) via the community-scripts addon?" "n" 60; then
|
if prompt_confirm "${TAB3}Would you like to install Portainer (UI) via the community-scripts addon?" "n" 60; then
|
||||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/portainer.sh)" <<<"y"
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/portainer.sh)" <<<"y"
|
||||||
else
|
else
|
||||||
read -r -p "${TAB3}Would you like to install the Portainer Agent (for remote management)? <y/N> " prompt_agent
|
read -r -p "${TAB3}Would you like to install the Portainer Agent (for remote management)? <y/N> " prompt_agent
|
||||||
if [[ ${prompt_agent,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt_agent,,} =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
|
msg_info "Installing Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
|
||||||
$STD docker run -d \
|
$STD docker run -d \
|
||||||
-p 9001:9001 \
|
-p 9001:9001 \
|
||||||
--name portainer_agent \
|
--name portainer_agent \
|
||||||
--restart=always \
|
--restart=always \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-v /var/lib/docker/volumes:/var/lib/docker/volumes \
|
-v /var/lib/docker/volumes:/var/lib/docker/volumes \
|
||||||
portainer/agent
|
portainer/agent
|
||||||
msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
|
msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Expose Docker TCP socket (insecure) ? [n = No, l = Local only (127.0.0.1), a = All interfaces (0.0.0.0)] <n/l/a>: " socket_choice
|
read -r -p "${TAB3}Expose Docker TCP socket (insecure) ? [n = No, l = Local only (127.0.0.1), a = All interfaces (0.0.0.0)] <n/l/a>: " socket_choice
|
||||||
case "${socket_choice,,}" in
|
case "${socket_choice,,}" in
|
||||||
l)
|
l)
|
||||||
socket="tcp://127.0.0.1:2375"
|
socket="tcp://127.0.0.1:2375"
|
||||||
;;
|
;;
|
||||||
a)
|
a)
|
||||||
socket="tcp://0.0.0.0:2375"
|
socket="tcp://0.0.0.0:2375"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
socket=""
|
socket=""
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ -n "$socket" ]]; then
|
if [[ -n "$socket" ]]; then
|
||||||
msg_info "Enabling Docker TCP socket on $socket"
|
msg_info "Enabling Docker TCP socket on $socket"
|
||||||
$STD apt-get install -y jq
|
$STD apt-get install -y jq
|
||||||
|
|
||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
jq --arg sock "$socket" '. + { "hosts": ["unix:///var/run/docker.sock", $sock] }' /etc/docker/daemon.json >"$tmpfile" && mv "$tmpfile" /etc/docker/daemon.json
|
jq --arg sock "$socket" '. + { "hosts": ["unix:///var/run/docker.sock", $sock] }' /etc/docker/daemon.json >"$tmpfile" && mv "$tmpfile" /etc/docker/daemon.json
|
||||||
|
|
||||||
mkdir -p /etc/systemd/system/docker.service.d
|
mkdir -p /etc/systemd/system/docker.service.d
|
||||||
cat <<EOF >/etc/systemd/system/docker.service.d/override.conf
|
cat <<EOF >/etc/systemd/system/docker.service.d/override.conf
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=$(command -v dockerd || echo /usr/sbin/dockerd)
|
ExecStart=$(command -v dockerd || echo /usr/sbin/dockerd)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
$STD systemctl daemon-reexec
|
$STD systemctl daemon-reexec
|
||||||
$STD systemctl daemon-reload
|
$STD systemctl daemon-reload
|
||||||
|
|
||||||
if systemctl restart docker; then
|
if systemctl restart docker; then
|
||||||
msg_ok "Docker TCP socket available on $socket"
|
msg_ok "Docker TCP socket available on $socket"
|
||||||
else
|
else
|
||||||
msg_error "Docker failed to restart. Check journalctl -xeu docker.service"
|
msg_error "Docker failed to restart. Check journalctl -xeu docker.service"
|
||||||
exit 150
|
exit 150
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apk add tzdata openssl
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing Docker"
|
||||||
|
$STD apk add docker
|
||||||
|
$STD rc-service docker start
|
||||||
|
$STD rc-update add docker default
|
||||||
|
msg_ok "Installed Docker"
|
||||||
|
|
||||||
|
get_latest_release() {
|
||||||
|
curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
||||||
|
}
|
||||||
|
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
|
||||||
|
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent")
|
||||||
|
|
||||||
|
read -r -p "${TAB3}Would you like to add Docker Compose? <y/N> " prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
|
||||||
|
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||||
|
mkdir -p "$DOCKER_CONFIG"/cli-plugins
|
||||||
|
curl -fsSL https://github.com/docker/compose/releases/download/"$DOCKER_COMPOSE_LATEST_VERSION"/docker-compose-linux-$(arch_resolve "x86_64" "aarch64") -o ~/.docker/cli-plugins/docker-compose
|
||||||
|
chmod +x "$DOCKER_CONFIG"/cli-plugins/docker-compose
|
||||||
|
msg_ok "Installed Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if prompt_confirm "${TAB3}Would you like to install Portainer (UI) via the community-scripts addon?" "n" 60; then
|
||||||
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/portainer.sh)" <<<"y"
|
||||||
|
else
|
||||||
|
read -r -p "${TAB3}Would you like to add the Portainer Agent? <y/N> " prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
|
||||||
|
$STD docker run -d \
|
||||||
|
-p 9001:9001 \
|
||||||
|
--name portainer_agent \
|
||||||
|
--restart=always \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-v /var/lib/docker/volumes:/var/lib/docker/volumes \
|
||||||
|
portainer/agent
|
||||||
|
msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -r -p "${TAB3}Would you like to expose the Docker TCP socket? <y/N> " prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
msg_info "Exposing Docker TCP socket"
|
||||||
|
$STD mkdir -p /etc/docker
|
||||||
|
$STD echo '{ "hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"] }' >/etc/docker/daemon.json
|
||||||
|
$STD rc-service docker restart
|
||||||
|
msg_ok "Exposed Docker TCP socket at tcp://+:2375"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+38
-20
@@ -13,27 +13,28 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
setup_deb_based() {
|
||||||
$STD apt install -y \
|
msg_info "Installing Dependencies"
|
||||||
git \
|
$STD apt install -y \
|
||||||
git-lfs
|
git \
|
||||||
msg_ok "Installed Dependencies"
|
git-lfs
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
fetch_and_deploy_codeberg_release "forgejo" "forgejo/forgejo" "singlefile" "latest" "/opt/forgejo" "forgejo-*-linux-$(arch_resolve)"
|
fetch_and_deploy_codeberg_release "forgejo" "forgejo/forgejo" "singlefile" "latest" "/opt/forgejo" "forgejo-*-linux-$(arch_resolve)"
|
||||||
ln -sf /opt/forgejo/forgejo /usr/local/bin/forgejo
|
ln -sf /opt/forgejo/forgejo /usr/local/bin/forgejo
|
||||||
|
|
||||||
msg_info "Setting up Forgejo"
|
msg_info "Setting up Forgejo"
|
||||||
$STD adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
|
$STD adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
|
||||||
mkdir /var/lib/forgejo
|
mkdir /var/lib/forgejo
|
||||||
chown git:git /var/lib/forgejo
|
chown git:git /var/lib/forgejo
|
||||||
chmod 750 /var/lib/forgejo
|
chmod 750 /var/lib/forgejo
|
||||||
mkdir /etc/forgejo
|
mkdir /etc/forgejo
|
||||||
chown root:git /etc/forgejo
|
chown root:git /etc/forgejo
|
||||||
chmod 770 /etc/forgejo
|
chmod 770 /etc/forgejo
|
||||||
msg_ok "Setup Forgejo"
|
msg_ok "Setup Forgejo"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/forgejo.service
|
cat <<EOF >/etc/systemd/system/forgejo.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Forgejo
|
Description=Forgejo
|
||||||
After=syslog.target
|
After=syslog.target
|
||||||
@@ -50,8 +51,25 @@ Environment=USER=git HOME=/home/git FORGEJO_WORK_DIR=/var/lib/forgejo
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now forgejo
|
systemctl enable -q --now forgejo
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Forgejo"
|
||||||
|
$STD apk add --no-cache forgejo
|
||||||
|
msg_ok "Installed Forgejo"
|
||||||
|
|
||||||
|
msg_info "Enabling Forgejo Service"
|
||||||
|
$STD rc-update add forgejo default
|
||||||
|
msg_ok "Enabled Forgejo Service"
|
||||||
|
|
||||||
|
msg_info "Starting Forgejo"
|
||||||
|
$STD service forgejo start
|
||||||
|
msg_ok "Started Forgejo"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+90
-17
@@ -13,23 +13,24 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Setup Garage"
|
setup_deb_based() {
|
||||||
GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
|
msg_info "Setup Garage"
|
||||||
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
|
GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
|
||||||
chmod +x /usr/local/bin/garage
|
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
|
||||||
mkdir -p /var/lib/garage/{data,meta,snapshots}
|
chmod +x /usr/local/bin/garage
|
||||||
mkdir -p /etc/garage
|
mkdir -p /var/lib/garage/{data,meta,snapshots}
|
||||||
RPC_SECRET=$(openssl rand -hex 32)
|
mkdir -p /etc/garage
|
||||||
ADMIN_TOKEN=$(openssl rand -base64 32)
|
RPC_SECRET=$(openssl rand -hex 32)
|
||||||
METRICS_TOKEN=$(openssl rand -base64 32)
|
ADMIN_TOKEN=$(openssl rand -base64 32)
|
||||||
cat <<EOF >~/garage.creds
|
METRICS_TOKEN=$(openssl rand -base64 32)
|
||||||
|
cat <<EOF >~/garage.creds
|
||||||
Garage Tokens and Secrets
|
Garage Tokens and Secrets
|
||||||
RPC Secret: $RPC_SECRET
|
RPC Secret: $RPC_SECRET
|
||||||
Admin Token: $ADMIN_TOKEN
|
Admin Token: $ADMIN_TOKEN
|
||||||
Metrics Token: $METRICS_TOKEN
|
Metrics Token: $METRICS_TOKEN
|
||||||
EOF
|
EOF
|
||||||
echo $GITEA_RELEASE >>~/.garage
|
echo $GITEA_RELEASE >>~/.garage
|
||||||
cat <<EOF >/etc/garage.toml
|
cat <<EOF >/etc/garage.toml
|
||||||
metadata_dir = "/var/lib/garage/meta"
|
metadata_dir = "/var/lib/garage/meta"
|
||||||
data_dir = "/var/lib/garage/data"
|
data_dir = "/var/lib/garage/data"
|
||||||
db_engine = "sqlite"
|
db_engine = "sqlite"
|
||||||
@@ -57,10 +58,10 @@ api_bind_addr = "[::]:3903"
|
|||||||
admin_token = "${ADMIN_TOKEN}"
|
admin_token = "${ADMIN_TOKEN}"
|
||||||
metrics_token = "${METRICS_TOKEN}"
|
metrics_token = "${METRICS_TOKEN}"
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Set up Garage"
|
msg_ok "Set up Garage"
|
||||||
|
|
||||||
msg_info "Creating service"
|
msg_info "Creating service"
|
||||||
cat <<'EOF' >/etc/systemd/system/garage.service
|
cat <<'EOF' >/etc/systemd/system/garage.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Garage Object Storage (Deuxfleurs)
|
Description=Garage Object Storage (Deuxfleurs)
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
@@ -81,8 +82,80 @@ LimitNOFILE=65536
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
$STD systemctl enable -q --now garage
|
$STD systemctl enable -q --now garage
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apk add --no-cache openssl
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
|
||||||
|
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
|
||||||
|
chmod +x /usr/local/bin/garage
|
||||||
|
mkdir -p /var/lib/garage/{data,meta,snapshots}
|
||||||
|
mkdir -p /etc/garage
|
||||||
|
RPC_SECRET=$(openssl rand -hex 64 | cut -c1-64)
|
||||||
|
ADMIN_TOKEN=$(openssl rand -base64 32)
|
||||||
|
METRICS_TOKEN=$(openssl rand -base64 32)
|
||||||
|
cat <<EOF >~/garage.creds
|
||||||
|
Garage Tokens and Secrets
|
||||||
|
RPC Secret: $RPC_SECRET
|
||||||
|
Admin Token: $ADMIN_TOKEN
|
||||||
|
Metrics Token: $METRICS_TOKEN
|
||||||
|
EOF
|
||||||
|
echo $GITEA_RELEASE >>~/.garage
|
||||||
|
cat <<EOF >/etc/garage.toml
|
||||||
|
metadata_dir = "/var/lib/garage/meta"
|
||||||
|
data_dir = "/var/lib/garage/data"
|
||||||
|
db_engine = "sqlite"
|
||||||
|
replication_factor = 1
|
||||||
|
|
||||||
|
rpc_bind_addr = "0.0.0.0:3901"
|
||||||
|
rpc_public_addr = "127.0.0.1:3901"
|
||||||
|
rpc_secret = "${RPC_SECRET}"
|
||||||
|
|
||||||
|
[s3_api]
|
||||||
|
s3_region = "garage"
|
||||||
|
api_bind_addr = "0.0.0.0:3900"
|
||||||
|
root_domain = ".s3.garage"
|
||||||
|
|
||||||
|
[s3_web]
|
||||||
|
bind_addr = "0.0.0.0:3902"
|
||||||
|
root_domain = ".web.garage"
|
||||||
|
index = "index.html"
|
||||||
|
|
||||||
|
[k2v_api]
|
||||||
|
api_bind_addr = "0.0.0.0:3904"
|
||||||
|
|
||||||
|
[admin]
|
||||||
|
api_bind_addr = "0.0.0.0:3903"
|
||||||
|
admin_token = "${ADMIN_TOKEN}"
|
||||||
|
metrics_token = "${METRICS_TOKEN}"
|
||||||
|
EOF
|
||||||
|
msg_ok "Configured Garage"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<'EOF' >/etc/init.d/garage
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
name="Garage Object Storage"
|
||||||
|
command="/usr/local/bin/garage"
|
||||||
|
command_args="server"
|
||||||
|
command_background="yes"
|
||||||
|
pidfile="/run/garage.pid"
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x /etc/init.d/garage
|
||||||
|
$STD rc-update add garage default
|
||||||
|
$STD rc-service garage restart || rc-service garage start
|
||||||
|
msg_ok "Service active"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+74
-18
@@ -13,25 +13,26 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
setup_deb_based() {
|
||||||
$STD apt install -y \
|
msg_info "Installing Dependencies"
|
||||||
ca-certificates \
|
$STD apt install -y \
|
||||||
libcap2-bin
|
ca-certificates \
|
||||||
msg_ok "Installed Dependencies"
|
libcap2-bin
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
setup_go
|
setup_go
|
||||||
fetch_and_deploy_gh_release "gatus" "TwiN/gatus" "tarball"
|
fetch_and_deploy_gh_release "gatus" "TwiN/gatus" "tarball"
|
||||||
|
|
||||||
msg_info "Configuring gatus"
|
msg_info "Configuring gatus"
|
||||||
cd /opt/gatus
|
cd /opt/gatus
|
||||||
$STD go mod tidy
|
$STD go mod tidy
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
|
||||||
setcap CAP_NET_RAW+ep gatus
|
setcap CAP_NET_RAW+ep gatus
|
||||||
mv config.yaml config
|
mv config.yaml config
|
||||||
msg_ok "Configured gatus"
|
msg_ok "Configured gatus"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/gatus.service
|
cat <<EOF >/etc/systemd/system/gatus.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=gatus Service
|
Description=gatus Service
|
||||||
After=network.target
|
After=network.target
|
||||||
@@ -46,8 +47,63 @@ Restart=always
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now gatus
|
systemctl enable -q --now gatus
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing dependencies"
|
||||||
|
$STD apk add --no-cache \
|
||||||
|
ca-certificates \
|
||||||
|
libcap-setcap
|
||||||
|
$STD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community go
|
||||||
|
msg_ok "Installed dependencies"
|
||||||
|
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/TwiN/gatus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
msg_info "Installing gatus v${RELEASE}"
|
||||||
|
temp_file=$(mktemp)
|
||||||
|
mkdir -p /opt/gatus
|
||||||
|
curl -fsSL "https://github.com/TwiN/gatus/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||||
|
tar zxf "$temp_file" --strip-components=1 -C /opt/gatus
|
||||||
|
cd /opt/gatus
|
||||||
|
$STD go mod tidy
|
||||||
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
|
||||||
|
setcap CAP_NET_RAW+ep gatus
|
||||||
|
mv config.yaml config
|
||||||
|
echo "${RELEASE}" >/opt/gatus_version.txt
|
||||||
|
msg_ok "Installed gatus v${RELEASE}"
|
||||||
|
|
||||||
|
msg_info "Enabling gatus Service"
|
||||||
|
cat <<EOF >/etc/init.d/gatus
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
description="gatus Service"
|
||||||
|
directory="/opt/gatus"
|
||||||
|
command="/opt/gatus/gatus"
|
||||||
|
command_args=""
|
||||||
|
command_background="true"
|
||||||
|
command_user="root"
|
||||||
|
pidfile="/var/run/gatus.pid"
|
||||||
|
|
||||||
|
export GATUS_CONFIG_PATH=""
|
||||||
|
export GATUS_LOG_LEVEL="INFO"
|
||||||
|
export PORT="8080"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
use net
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
chmod +x /etc/init.d/gatus
|
||||||
|
$STD rc-update add gatus default
|
||||||
|
msg_ok "Enabled gatus Service"
|
||||||
|
|
||||||
|
msg_info "Starting gatus"
|
||||||
|
$STD service gatus start
|
||||||
|
msg_ok "Started gatus"
|
||||||
|
|
||||||
|
rm -f "$temp_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+38
-20
@@ -14,27 +14,28 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
setup_deb_based() {
|
||||||
$STD apt install -y \
|
msg_info "Installing Dependencies"
|
||||||
git \
|
$STD apt install -y \
|
||||||
sqlite3
|
git \
|
||||||
msg_ok "Installed Dependencies"
|
sqlite3
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "gitea" "go-gitea/gitea" "singlefile" "latest" "/usr/local/bin" "gitea-*-linux-$(arch_resolve)"
|
fetch_and_deploy_gh_release "gitea" "go-gitea/gitea" "singlefile" "latest" "/usr/local/bin" "gitea-*-linux-$(arch_resolve)"
|
||||||
|
|
||||||
msg_info "Configuring Gitea"
|
msg_info "Configuring Gitea"
|
||||||
chmod +x /usr/local/bin/gitea
|
chmod +x /usr/local/bin/gitea
|
||||||
$STD adduser --system --group --disabled-password --shell /bin/bash --home /etc/gitea gitea
|
$STD adduser --system --group --disabled-password --shell /bin/bash --home /etc/gitea gitea
|
||||||
mkdir -p /var/lib/gitea/{custom,data,log}
|
mkdir -p /var/lib/gitea/{custom,data,log}
|
||||||
chown -R gitea:gitea /var/lib/gitea/
|
chown -R gitea:gitea /var/lib/gitea/
|
||||||
chmod -R 750 /var/lib/gitea/
|
chmod -R 750 /var/lib/gitea/
|
||||||
chown root:gitea /etc/gitea
|
chown root:gitea /etc/gitea
|
||||||
chmod 770 /etc/gitea
|
chmod 770 /etc/gitea
|
||||||
sudo -u gitea ln -s /var/lib/gitea/data/.ssh/ /etc/gitea/.ssh
|
sudo -u gitea ln -s /var/lib/gitea/data/.ssh/ /etc/gitea/.ssh
|
||||||
msg_ok "Configured Gitea"
|
msg_ok "Configured Gitea"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/gitea.service
|
cat <<EOF >/etc/systemd/system/gitea.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Gitea (Git with a cup of tea)
|
Description=Gitea (Git with a cup of tea)
|
||||||
After=syslog.target
|
After=syslog.target
|
||||||
@@ -64,8 +65,25 @@ Environment=USER=gitea HOME=/var/lib/gitea/data GITEA_WORK_DIR=/var/lib/gitea
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now gitea
|
systemctl enable -q --now gitea
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Gitea"
|
||||||
|
$STD apk add --no-cache gitea
|
||||||
|
msg_ok "Installed Gitea"
|
||||||
|
|
||||||
|
msg_info "Enabling Gitea Service"
|
||||||
|
$STD rc-update add gitea default
|
||||||
|
msg_ok "Enabled Gitea Service"
|
||||||
|
|
||||||
|
msg_info "Starting Gitea"
|
||||||
|
$STD service gitea start
|
||||||
|
msg_ok "Started Gitea"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+28
-15
@@ -13,23 +13,36 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
setup_deb_based() {
|
||||||
$STD apt install -y apt-transport-https
|
msg_info "Installing Dependencies"
|
||||||
msg_ok "Installed Dependencies"
|
$STD apt install -y apt-transport-https
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Grafana Repository"
|
msg_info "Setting up Grafana Repository"
|
||||||
setup_deb822_repo \
|
setup_deb822_repo \
|
||||||
"grafana" \
|
"grafana" \
|
||||||
"https://apt.grafana.com/gpg.key" \
|
"https://apt.grafana.com/gpg.key" \
|
||||||
"https://apt.grafana.com" \
|
"https://apt.grafana.com" \
|
||||||
"stable" \
|
"stable" \
|
||||||
"main"
|
"main"
|
||||||
msg_ok "Grafana Repository setup sucessfully"
|
msg_ok "Grafana Repository setup sucessfully"
|
||||||
|
|
||||||
msg_info "Installing Grafana"
|
msg_info "Installing Grafana"
|
||||||
$STD apt install -y grafana
|
$STD apt install -y grafana
|
||||||
systemctl enable -q --now grafana-server
|
systemctl enable -q --now grafana-server
|
||||||
msg_ok "Installed Grafana"
|
msg_ok "Installed Grafana"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Grafana"
|
||||||
|
$STD apk add grafana
|
||||||
|
$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/grafana
|
||||||
|
$STD rc-service grafana start
|
||||||
|
$STD rc-update add grafana default
|
||||||
|
msg_ok "Installed Grafana"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+123
-37
@@ -13,30 +13,31 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
setup_deb_based() {
|
||||||
$STD apt install -y \
|
msg_info "Installing Dependencies"
|
||||||
dbus-user-session \
|
$STD apt install -y \
|
||||||
gnome-keyring \
|
dbus-user-session \
|
||||||
libsecret-tools
|
gnome-keyring \
|
||||||
msg_ok "Installed Dependencies"
|
libsecret-tools
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql
|
PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql
|
||||||
PG_DB_NAME="ironclaw" PG_DB_USER="ironclaw" PG_DB_EXTENSIONS="vector" setup_postgresql_db
|
PG_DB_NAME="ironclaw" PG_DB_USER="ironclaw" PG_DB_EXTENSIONS="vector" setup_postgresql_db
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "ironclaw-v0.29.1" "/usr/local/bin" \
|
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "ironclaw-v0.29.1" "/usr/local/bin" \
|
||||||
"ironclaw-$(uname -m)-unknown-linux-gnu.tar.gz"
|
"ironclaw-$(uname -m)-unknown-linux-gnu.tar.gz"
|
||||||
chmod +x /usr/local/bin/ironclaw
|
chmod +x /usr/local/bin/ironclaw
|
||||||
|
|
||||||
msg_info "Configuring Environment"
|
msg_info "Configuring Environment"
|
||||||
GATEWAY_TOKEN=$(openssl rand -hex 32)
|
GATEWAY_TOKEN=$(openssl rand -hex 32)
|
||||||
mkdir -p /root/.ironclaw
|
mkdir -p /root/.ironclaw
|
||||||
cat <<EOF >/root/.ironclaw/gateway.creds
|
cat <<EOF >/root/.ironclaw/gateway.creds
|
||||||
Gateway-Token
|
Gateway-Token
|
||||||
Token: $GATEWAY_TOKEN
|
Token: $GATEWAY_TOKEN
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p /root/.ironclaw
|
mkdir -p /root/.ironclaw
|
||||||
cat <<EOF >/root/.ironclaw/.env
|
cat <<EOF >/root/.ironclaw/.env
|
||||||
DATABASE_BACKEND=postgres
|
DATABASE_BACKEND=postgres
|
||||||
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}?sslmode=disable
|
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}?sslmode=disable
|
||||||
GATEWAY_ENABLED=true
|
GATEWAY_ENABLED=true
|
||||||
@@ -46,26 +47,26 @@ GATEWAY_AUTH_TOKEN=${GATEWAY_TOKEN}
|
|||||||
CLI_ENABLED=false
|
CLI_ENABLED=false
|
||||||
RUST_LOG=ironclaw=info,tower_http=info
|
RUST_LOG=ironclaw=info,tower_http=info
|
||||||
EOF
|
EOF
|
||||||
chmod 600 /root/.ironclaw/.env
|
chmod 600 /root/.ironclaw/.env
|
||||||
msg_ok "Configured Environment"
|
msg_ok "Configured Environment"
|
||||||
|
|
||||||
msg_info "Configuring IronClaw"
|
msg_info "Configuring IronClaw"
|
||||||
# Set values in the database since it is typically the true source of truth and ensures values are set correctly on first run before the service starts.
|
# Set values in the database since it is typically the true source of truth and ensures values are set correctly on first run before the service starts.
|
||||||
/usr/local/bin/ironclaw --no-onboard config set database_backend postgres >/dev/null
|
/usr/local/bin/ironclaw --no-onboard config set database_backend postgres >/dev/null
|
||||||
/usr/local/bin/ironclaw --no-onboard config set database_url "postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}?sslmode=disable" >/dev/null
|
/usr/local/bin/ironclaw --no-onboard config set database_url "postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}?sslmode=disable" >/dev/null
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_enabled true >/dev/null
|
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_enabled true >/dev/null
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_host 0.0.0.0 >/dev/null
|
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_host 0.0.0.0 >/dev/null
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_port 3000 >/dev/null
|
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_port 3000 >/dev/null
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_auth_token "${GATEWAY_TOKEN}" >/dev/null
|
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_auth_token "${GATEWAY_TOKEN}" >/dev/null
|
||||||
/usr/local/bin/ironclaw --no-onboard config set channels.cli_enabled false >/dev/null
|
/usr/local/bin/ironclaw --no-onboard config set channels.cli_enabled false >/dev/null
|
||||||
/usr/local/bin/ironclaw --no-onboard config set secrets_master_key_source none >/dev/null
|
/usr/local/bin/ironclaw --no-onboard config set secrets_master_key_source none >/dev/null
|
||||||
# Running ironclaw defaults to use env for secrets and creates this entry, but we want to set that during onboard.
|
# Running ironclaw defaults to use env for secrets and creates this entry, but we want to set that during onboard.
|
||||||
sleep 5
|
sleep 5
|
||||||
sed -i '/SECRETS_MASTER_KEY/d' /root/.ironclaw/.env
|
sed -i '/SECRETS_MASTER_KEY/d' /root/.ironclaw/.env
|
||||||
msg_ok "Configured IronClaw"
|
msg_ok "Configured IronClaw"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/ironclaw.service
|
cat <<EOF >/etc/systemd/system/ironclaw.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=IronClaw AI Agent
|
Description=IronClaw AI Agent
|
||||||
After=network.target postgresql.service
|
After=network.target postgresql.service
|
||||||
@@ -79,8 +80,93 @@ RestartSec=5
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q ironclaw
|
systemctl enable -q ironclaw
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apk add openssl dbus gnome-keyring
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing PostgreSQL"
|
||||||
|
$STD apk add postgresql17 postgresql17-openrc postgresql-pgvector postgresql-common
|
||||||
|
$STD rc-service postgresql setup
|
||||||
|
$STD rc-update add postgresql default
|
||||||
|
$STD rc-service postgresql start
|
||||||
|
msg_ok "Installed PostgreSQL"
|
||||||
|
|
||||||
|
msg_info "Setting up Database"
|
||||||
|
PG_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||||
|
$STD su -s /bin/sh postgres -c "psql -c \"CREATE ROLE ironclaw WITH LOGIN PASSWORD '${PG_PASS}';\""
|
||||||
|
$STD su -s /bin/sh postgres -c "psql -c \"CREATE DATABASE ironclaw WITH OWNER ironclaw;\""
|
||||||
|
$STD su -s /bin/sh postgres -c "psql -d ironclaw -c \"CREATE EXTENSION IF NOT EXISTS vector;\""
|
||||||
|
msg_ok "Set up Database"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "ironclaw-v0.29.1" "/usr/local/bin" \
|
||||||
|
"ironclaw-$(uname -m)-unknown-linux-musl.tar.gz"
|
||||||
|
chmod +x /usr/local/bin/ironclaw
|
||||||
|
|
||||||
|
msg_info "Configuring Environment"
|
||||||
|
GATEWAY_TOKEN=$(openssl rand -hex 32)
|
||||||
|
mkdir -p /root/.ironclaw
|
||||||
|
cat <<EOF >/root/.ironclaw/gateway.creds
|
||||||
|
Gateway-Token
|
||||||
|
Token: $GATEWAY_TOKEN
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p /root/.ironclaw
|
||||||
|
cat <<EOF >/root/.ironclaw/.env
|
||||||
|
DATABASE_BACKEND=postgres
|
||||||
|
DATABASE_URL=postgresql://ironclaw:${PG_PASS}@localhost:5432/ironclaw?sslmode=disable
|
||||||
|
GATEWAY_ENABLED=true
|
||||||
|
GATEWAY_HOST=0.0.0.0
|
||||||
|
GATEWAY_PORT=3000
|
||||||
|
GATEWAY_AUTH_TOKEN=${GATEWAY_TOKEN}
|
||||||
|
CLI_ENABLED=false
|
||||||
|
RUST_LOG=ironclaw=info,tower_http=info
|
||||||
|
EOF
|
||||||
|
chmod 600 /root/.ironclaw/.env
|
||||||
|
msg_ok "Configured Environment"
|
||||||
|
|
||||||
|
msg_info "Configuring IronClaw"
|
||||||
|
# Set values in the database since it is typically the true source of truth and ensures values are set correctly on first run before the service starts.
|
||||||
|
/usr/local/bin/ironclaw --no-onboard config set database_backend postgres >/dev/null
|
||||||
|
/usr/local/bin/ironclaw --no-onboard config set database_url "postgresql://ironclaw:${PG_PASS}@localhost:5432/ironclaw?sslmode=disable" >/dev/null
|
||||||
|
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_enabled true >/dev/null
|
||||||
|
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_host 0.0.0.0 >/dev/null
|
||||||
|
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_port 3000 >/dev/null
|
||||||
|
/usr/local/bin/ironclaw --no-onboard config set channels.gateway_auth_token "${GATEWAY_TOKEN}" >/dev/null
|
||||||
|
/usr/local/bin/ironclaw --no-onboard config set channels.cli_enabled false >/dev/null
|
||||||
|
/usr/local/bin/ironclaw --no-onboard config set secrets_master_key_source none >/dev/null
|
||||||
|
# Running ironclaw defaults to use env for secrets and creates this entry, but we want to set that during onboard.
|
||||||
|
sleep 5
|
||||||
|
sed -i '/SECRETS_MASTER_KEY/d' /root/.ironclaw/.env
|
||||||
|
msg_ok "Configured IronClaw"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/init.d/ironclaw
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
name="IronClaw"
|
||||||
|
description="IronClaw AI Agent"
|
||||||
|
command="/usr/bin/dbus-run-session"
|
||||||
|
command_args="/usr/local/bin/ironclaw"
|
||||||
|
command_background=true
|
||||||
|
pidfile="/run/ironclaw.pid"
|
||||||
|
directory="/root"
|
||||||
|
supervise_daemon_args="--env-file /root/.ironclaw/.env"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net postgresql
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
chmod +x /etc/init.d/ironclaw
|
||||||
|
$STD rc-update add ironclaw default
|
||||||
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+78
-14
@@ -13,18 +13,19 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
setup_deb822_repo \
|
setup_deb_based() {
|
||||||
"grafana" \
|
setup_deb822_repo \
|
||||||
"https://apt.grafana.com/gpg.key" \
|
"grafana" \
|
||||||
"https://apt.grafana.com" \
|
"https://apt.grafana.com/gpg.key" \
|
||||||
"stable" \
|
"https://apt.grafana.com" \
|
||||||
"main"
|
"stable" \
|
||||||
|
"main"
|
||||||
|
|
||||||
msg_info "Installing Loki"
|
msg_info "Installing Loki"
|
||||||
$STD apt install -y loki
|
$STD apt install -y loki
|
||||||
mkdir -p /var/lib/loki/{chunks,boltdb-shipper-active,boltdb-shipper-cache}
|
mkdir -p /var/lib/loki/{chunks,boltdb-shipper-active,boltdb-shipper-cache}
|
||||||
chown -R loki /var/lib/loki
|
chown -R loki /var/lib/loki
|
||||||
cat <<EOF >/etc/loki/config.yml
|
cat <<EOF >/etc/loki/config.yml
|
||||||
auth_enabled: false
|
auth_enabled: false
|
||||||
|
|
||||||
server:
|
server:
|
||||||
@@ -66,9 +67,72 @@ limits_config:
|
|||||||
ruler:
|
ruler:
|
||||||
alertmanager_url: http://localhost:9093
|
alertmanager_url: http://localhost:9093
|
||||||
EOF
|
EOF
|
||||||
chown loki /etc/loki/config.yml
|
chown loki /etc/loki/config.yml
|
||||||
systemctl enable -q --now loki
|
systemctl enable -q --now loki
|
||||||
msg_ok "Installed Loki"
|
msg_ok "Installed Loki"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Loki"
|
||||||
|
$STD apk add loki
|
||||||
|
$STD sed -i '/http_addr/s/127.0.0.1/0.0.0.0/g' /etc/conf.d/loki
|
||||||
|
mkdir -p /var/lib/loki/{chunks,boltdb-shipper-active,boltdb-shipper-cache}
|
||||||
|
chown -R loki:grafana /var/lib/loki
|
||||||
|
mkdir -p /var/log/loki
|
||||||
|
chown -R loki:grafana /var/log/loki
|
||||||
|
cat <<EOF >/etc/loki/loki-local-config.yaml
|
||||||
|
auth_enabled: false
|
||||||
|
|
||||||
|
server:
|
||||||
|
http_listen_port: 3100
|
||||||
|
log_level: info
|
||||||
|
|
||||||
|
common:
|
||||||
|
instance_addr: 127.0.0.1
|
||||||
|
path_prefix: /var/lib/loki
|
||||||
|
storage:
|
||||||
|
filesystem:
|
||||||
|
chunks_directory: /var/lib/loki/chunks
|
||||||
|
rules_directory: /var/lib/loki/rules
|
||||||
|
replication_factor: 1
|
||||||
|
ring:
|
||||||
|
kvstore:
|
||||||
|
store: inmemory
|
||||||
|
|
||||||
|
schema_config:
|
||||||
|
configs:
|
||||||
|
- from: 2020-10-24
|
||||||
|
store: tsdb
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v13
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 24h
|
||||||
|
|
||||||
|
query_range:
|
||||||
|
results_cache:
|
||||||
|
cache:
|
||||||
|
embedded_cache:
|
||||||
|
enabled: true
|
||||||
|
max_size_mb: 100
|
||||||
|
|
||||||
|
limits_config:
|
||||||
|
metric_aggregation_enabled: true
|
||||||
|
|
||||||
|
ruler:
|
||||||
|
alertmanager_url: http://localhost:9093
|
||||||
|
EOF
|
||||||
|
chown loki:grafana /etc/loki/loki-local-config.yaml
|
||||||
|
chmod 644 /etc/loki/loki-local-config.yaml
|
||||||
|
echo "output_log=\"\${output_log:-/var/log/loki/output.log}\"" >> /etc/init.d/loki
|
||||||
|
echo "error_log=\"\${error_log:-/var/log/loki/error.log}\"" >> /etc/init.d/loki
|
||||||
|
echo "start_stop_daemon_args=\"\${SSD_OPTS} -1 \${output_log} -2 \${error_log}\"" >> /etc/init.d/loki
|
||||||
|
$STD rc-update add loki default
|
||||||
|
$STD rc-service loki start
|
||||||
|
msg_ok "Installed Loki"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+78
-28
@@ -13,37 +13,87 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
setup_mariadb
|
setup_deb_based() {
|
||||||
|
setup_mariadb
|
||||||
|
|
||||||
msg_info "Setup MariaDB"
|
msg_info "Setup MariaDB"
|
||||||
sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf
|
sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf
|
||||||
sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf
|
sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||||
msg_ok "Setup MariaDB"
|
msg_ok "Setup MariaDB"
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt
|
read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt
|
||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing phpMyAdmin"
|
msg_info "Installing phpMyAdmin"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
apache2 \
|
apache2 \
|
||||||
php \
|
php \
|
||||||
php-mysqli \
|
php-mysqli \
|
||||||
php-mbstring \
|
php-mbstring \
|
||||||
php-zip \
|
php-zip \
|
||||||
php-gd \
|
php-gd \
|
||||||
php-json \
|
php-json \
|
||||||
php-curl
|
php-curl
|
||||||
|
|
||||||
curl -fsSL "https://files.phpmyadmin.net/phpMyAdmin/5.2.2/phpMyAdmin-5.2.2-all-languages.tar.gz" -o "phpMyAdmin-5.2.2-all-languages.tar.gz"
|
curl -fsSL "https://files.phpmyadmin.net/phpMyAdmin/5.2.2/phpMyAdmin-5.2.2-all-languages.tar.gz" -o "phpMyAdmin-5.2.2-all-languages.tar.gz"
|
||||||
mkdir -p /var/www/html/phpMyAdmin
|
mkdir -p /var/www/html/phpMyAdmin
|
||||||
tar xf phpMyAdmin-5.2.2-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin
|
tar xf phpMyAdmin-5.2.2-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin
|
||||||
cp /var/www/html/phpMyAdmin/config.sample.inc.php /var/www/html/phpMyAdmin/config.inc.php
|
cp /var/www/html/phpMyAdmin/config.sample.inc.php /var/www/html/phpMyAdmin/config.inc.php
|
||||||
SECRET=$(openssl rand -base64 24)
|
SECRET=$(openssl rand -base64 24)
|
||||||
sed -i "s#\$cfg\['blowfish_secret'\] = '';#\$cfg['blowfish_secret'] = '${SECRET}';#" /var/www/html/phpMyAdmin/config.inc.php
|
sed -i "s#\$cfg\['blowfish_secret'\] = '';#\$cfg['blowfish_secret'] = '${SECRET}';#" /var/www/html/phpMyAdmin/config.inc.php
|
||||||
chmod 660 /var/www/html/phpMyAdmin/config.inc.php
|
chmod 660 /var/www/html/phpMyAdmin/config.inc.php
|
||||||
chown -R www-data:www-data /var/www/html/phpMyAdmin
|
chown -R www-data:www-data /var/www/html/phpMyAdmin
|
||||||
systemctl restart apache2
|
systemctl restart apache2
|
||||||
msg_ok "Installed phpMyAdmin"
|
msg_ok "Installed phpMyAdmin"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing MariaDB"
|
||||||
|
$STD apk add --no-cache mariadb mariadb-client
|
||||||
|
$STD rc-update add mariadb default
|
||||||
|
msg_ok "Installed MariaDB"
|
||||||
|
|
||||||
|
msg_info "Configuring MariaDB"
|
||||||
|
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql >/dev/null 2>&1
|
||||||
|
$STD rc-service mariadb start
|
||||||
|
msg_ok "MariaDB Configured"
|
||||||
|
|
||||||
|
read -r -p "${TAB3}Would you like to install Adminer with lighttpd? <y/N>: " prompt
|
||||||
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
|
msg_info "Installing Adminer and dependencies"
|
||||||
|
$STD apk add --no-cache \
|
||||||
|
lighttpd \
|
||||||
|
lighttpd-openrc \
|
||||||
|
php83 \
|
||||||
|
php83-cgi \
|
||||||
|
php83-common \
|
||||||
|
php83-curl \
|
||||||
|
php83-gd \
|
||||||
|
php83-mbstring \
|
||||||
|
php83-mysqli \
|
||||||
|
php83-mysqlnd \
|
||||||
|
php83-openssl \
|
||||||
|
php83-zip \
|
||||||
|
php83-session \
|
||||||
|
jq
|
||||||
|
|
||||||
|
sed -i 's|# *include "mod_fastcgi.conf"|include "mod_fastcgi.conf"|' /etc/lighttpd/lighttpd.conf
|
||||||
|
sed -i 's|/usr/bin/php-cgi|/usr/bin/php-cgi83|g' /etc/lighttpd/mod_fastcgi.conf
|
||||||
|
mkdir -p /var/www/localhost/htdocs
|
||||||
|
ADMINER_VERSION=$(curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/^v//')
|
||||||
|
curl -fsSL "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php" -o /var/www/localhost/htdocs/adminer.php
|
||||||
|
chown lighttpd:lighttpd /var/www/localhost/htdocs/adminer.php
|
||||||
|
chmod 755 /var/www/localhost/htdocs/adminer.php
|
||||||
|
msg_ok "Adminer Installed"
|
||||||
|
|
||||||
|
msg_info "Starting Lighttpd"
|
||||||
|
$STD rc-update add lighttpd default
|
||||||
|
$STD rc-service lighttpd restart
|
||||||
|
msg_ok "Lighttpd Started"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
+86
-35
@@ -13,48 +13,99 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
setup_deb_based() {
|
||||||
$STD apt install -y \
|
msg_info "Installing Dependencies"
|
||||||
git \
|
$STD apt install -y \
|
||||||
ca-certificates
|
git \
|
||||||
msg_ok "Installed Dependencies"
|
ca-certificates
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
|
|
||||||
msg_info "Installing Node-Red"
|
msg_info "Installing Node-Red"
|
||||||
$STD npm install -g --unsafe-perm node-red
|
$STD npm install -g --unsafe-perm node-red
|
||||||
echo "journalctl -f -n 100 -u nodered -o cat" >/usr/bin/node-red-log
|
echo "journalctl -f -n 100 -u nodered -o cat" >/usr/bin/node-red-log
|
||||||
chmod +x /usr/bin/node-red-log
|
chmod +x /usr/bin/node-red-log
|
||||||
echo "systemctl stop nodered" >/usr/bin/node-red-stop
|
echo "systemctl stop nodered" >/usr/bin/node-red-stop
|
||||||
chmod +x /usr/bin/node-red-stop
|
chmod +x /usr/bin/node-red-stop
|
||||||
echo "systemctl start nodered" >/usr/bin/node-red-start
|
echo "systemctl start nodered" >/usr/bin/node-red-start
|
||||||
chmod +x /usr/bin/node-red-start
|
chmod +x /usr/bin/node-red-start
|
||||||
echo "systemctl restart nodered" >/usr/bin/node-red-restart
|
echo "systemctl restart nodered" >/usr/bin/node-red-restart
|
||||||
chmod +x /usr/bin/node-red-restart
|
chmod +x /usr/bin/node-red-restart
|
||||||
msg_ok "Installed Node-Red"
|
msg_ok "Installed Node-Red"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
service_path="/etc/systemd/system/nodered.service"
|
service_path="/etc/systemd/system/nodered.service"
|
||||||
echo "[Unit]
|
echo "[Unit]
|
||||||
Description=Node-RED
|
Description=Node-RED
|
||||||
After=syslog.target network.target
|
After=syslog.target network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/node-red --max-old-space-size=128 -v
|
ExecStart=/usr/bin/node-red --max-old-space-size=128 -v
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
KillSignal=SIGINT
|
KillSignal=SIGINT
|
||||||
|
|
||||||
SyslogIdentifier=node-red
|
SyslogIdentifier=node-red
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
|
|
||||||
WorkingDirectory=/root/
|
WorkingDirectory=/root/
|
||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >$service_path
|
WantedBy=multi-user.target" >$service_path
|
||||||
systemctl enable -q --now nodered
|
systemctl enable -q --now nodered
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_alpine() {
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apk add --no-cache \
|
||||||
|
git \
|
||||||
|
nodejs \
|
||||||
|
npm
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Creating Node-RED User"
|
||||||
|
adduser -D -H -s /sbin/nologin -G users nodered
|
||||||
|
msg_ok "Created Node-RED User"
|
||||||
|
|
||||||
|
msg_info "Installing Node-RED"
|
||||||
|
$STD npm install -g --unsafe-perm node-red
|
||||||
|
msg_ok "Installed Node-RED"
|
||||||
|
|
||||||
|
msg_info "Creating /home/nodered"
|
||||||
|
mkdir -p /home/nodered
|
||||||
|
chown -R nodered:users /home/nodered
|
||||||
|
chmod 750 /home/nodered
|
||||||
|
msg_ok "Created /home/nodered"
|
||||||
|
|
||||||
|
msg_info "Creating Node-RED Service"
|
||||||
|
service_path="/etc/init.d/nodered"
|
||||||
|
|
||||||
|
echo '#!/sbin/openrc-run
|
||||||
|
description="Node-RED Service"
|
||||||
|
|
||||||
|
command="/usr/local/bin/node-red"
|
||||||
|
command_args="--max-old-space-size=128 -v"
|
||||||
|
command_user="nodered"
|
||||||
|
pidfile="/var/run/nodered.pid"
|
||||||
|
command_background="yes"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
use net
|
||||||
|
}' >$service_path
|
||||||
|
|
||||||
|
chmod +x $service_path
|
||||||
|
msg_ok "Created Node-RED Service"
|
||||||
|
|
||||||
|
msg_info "Starting Node-RED"
|
||||||
|
$STD rc-update add nodered
|
||||||
|
$STD rc-service nodered start
|
||||||
|
msg_ok "Started Node-RED"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_os_setup
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user