Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit 6993900

Browse files
authored
Update (#85)
* feat: update * feat: update
1 parent 1dc33a7 commit 6993900

File tree

313 files changed

+7283
-2478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

313 files changed

+7283
-2478
lines changed

codemods/update_os.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ EOF
1515
$STD apt-get update
1616
$STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
1717
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
18-
$STD apt-get install -y wget logrotate curl unzip sudo mc gnupg2
18+
$STD apt-get install -y wget logrotate curl unzip sudo mc gnupg2 gpg
1919
if [[ "$INSTALL_SSH" == "yes" ]]; then
2020
$STD apt-get install -y openssh-server
2121
fi

ct/alpine-bitmagnet.sh

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/bitmagnet-io/bitmagnet
7+
8+
APP="Alpine-bitmagnet"
9+
var_tags="${var_tags:-alpine;torrent}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-1024}"
12+
var_disk="${var_disk:-3}"
13+
var_os="${var_os:-alpine}"
14+
var_version="${var_version:-3.21}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
25+
if [[ ! -d /opt/bitmagnet ]]; then
26+
msg_error "No ${APP} Installation Found!"
27+
exit 1
28+
fi
29+
RELEASE=$(curl -fsSL https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
30+
if [ "${RELEASE}" != "$(cat /opt/bitmagnet_version.txt)" ] || [ ! -f /opt/bitmagnet_version.txt ]; then
31+
msg_info "Backing up database"
32+
rm -f /tmp/backup.sql
33+
$STD sudo -u postgres pg_dump \
34+
--column-inserts \
35+
--data-only \
36+
--on-conflict-do-nothing \
37+
--rows-per-insert=1000 \
38+
--table=metadata_sources \
39+
--table=content \
40+
--table=content_attributes \
41+
--table=content_collections \
42+
--table=content_collections_content \
43+
--table=torrent_sources \
44+
--table=torrents \
45+
--table=torrent_files \
46+
--table=torrent_hints \
47+
--table=torrent_contents \
48+
--table=torrent_tags \
49+
--table=torrents_torrent_sources \
50+
--table=key_values \
51+
bitmagnet \
52+
>/tmp/backup.sql
53+
mv /tmp/backup.sql /opt/
54+
msg_ok "Database backed up"
55+
56+
msg_info "Updating ${APP} from $(cat /opt/bitmagnet_version.txt) to ${RELEASE}"
57+
$STD apk -U upgrade
58+
$STD service bitmagnet stop
59+
[ -f /opt/bitmagnet/.env ] && cp /opt/bitmagnet/.env /opt/
60+
[ -f /opt/bitmagnet/config.yml ] && cp /opt/bitmagnet/config.yml /opt/
61+
rm -rf /opt/bitmagnet/*
62+
temp_file=$(mktemp)
63+
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
64+
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
65+
cd /opt/bitmagnet
66+
VREL=v$RELEASE
67+
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
68+
chmod +x bitmagnet
69+
[ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/
70+
[ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/
71+
rm -f "$temp_file"
72+
echo "${RELEASE}" >/opt/bitmagnet_version.txt
73+
$STD service bitmagnet start
74+
msg_ok "Updated Successfully"
75+
else
76+
msg_ok "No update required. ${APP} is already at ${RELEASE}"
77+
fi
78+
79+
exit 0
80+
}
81+
82+
start
83+
build_container
84+
description
85+
86+
msg_ok "Completed Successfully!\n"
87+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
88+
echo -e "${INFO}${YW} Access it using the following IP:${CL}"
89+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3333${CL}"

ct/alpine-gatus.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/TwiN/gatus
7+
8+
APP="Alpine-gatus"
9+
var_tags="${var_tags:-alpine;monitoring}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-256}"
12+
var_disk="${var_disk:-3}"
13+
var_os="${var_os:-alpine}"
14+
var_version="${var_version:-3.21}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
25+
if [[ ! -d /opt/gatus ]]; then
26+
msg_error "No ${APP} Installation Found!"
27+
exit 1
28+
fi
29+
RELEASE=$(curl -s https://api.github.com/repos/TwiN/gatus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
30+
if [ "${RELEASE}" != "$(cat /opt/gatus_version.txt)" ] || [ ! -f /opt/gatus_version.txt ]; then
31+
msg_info "Updating ${APP} LXC"
32+
$STD apk -U upgrade
33+
$STD service gatus stop
34+
mv /opt/gatus/config/config.yaml /opt
35+
rm -rf /opt/gatus/*
36+
temp_file=$(mktemp)
37+
curl -fsSL "https://github.com/TwiN/gatus/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
38+
tar zxf "$temp_file" --strip-components=1 -C /opt/gatus
39+
cd /opt/gatus
40+
$STD go mod tidy
41+
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gatus .
42+
setcap CAP_NET_RAW+ep gatus
43+
mv /opt/config.yaml config
44+
rm -f "$temp_file"
45+
echo "${RELEASE}" >/opt/gatus_version.txt
46+
$STD service gatus start
47+
msg_ok "Updated Successfully"
48+
else
49+
msg_ok "No update required. ${APP} is already at ${RELEASE}"
50+
fi
51+
52+
exit 0
53+
}
54+
55+
start
56+
build_container
57+
description
58+
59+
msg_ok "Completed Successfully!\n"
60+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
61+
echo -e "${INFO}${YW} Access it using the following IP:${CL}"
62+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"

ct/alpine-traefik.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://alpinelinux.org/
7+
8+
APP="Alpine-Traefik"
9+
var_tags="${var_tags:-os;alpine}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-512}"
12+
var_disk="${var_disk:-1}"
13+
var_os="${var_os:-alpine}"
14+
var_version="${var_version:-3.21}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
msg_info "Updating Alpine Packages"
25+
$STD apk -U upgrade
26+
msg_ok "Updated Alpine Packages"
27+
28+
msg_info "Upgrading traefik from edge"
29+
$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
30+
msg_ok "Upgraded traefik"
31+
exit
32+
}
33+
34+
start
35+
build_container
36+
description
37+
38+
msg_ok "Completed Successfully!\n"
39+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
40+
echo -e "${INFO}${YW} WebUI Access (if configured) - using the following URL:${CL}"
41+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/dashboard${CL}"

ct/argus.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://release-argus.io/
7+
8+
APP="Argus"
9+
var_tags="${var_tags:-watcher}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-512}"
12+
var_disk="${var_disk:-3}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d /opt/argus ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
32+
RELEASE=$(curl -fsSL https://api.github.com/repos/release-argus/Argus/releases/latest | jq -r .tag_name | sed 's/^v//')
33+
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
34+
msg_info "Updating $APP to ${RELEASE}"
35+
rm -f /opt/argus/Argus
36+
curl -fsSL "https://github.com/release-argus/Argus/releases/download/${RELEASE}/Argus-${RELEASE}.linux-amd64" -o /opt/argus/Argus
37+
chmod +x /opt/argus/Argus
38+
systemctl restart argus
39+
echo "${RELEASE}" >/opt/${APP}_version.txt
40+
msg_ok "Updated ${APP} to ${RELEASE}"
41+
else
42+
msg_ok "${APP} is already up to date (${RELEASE})"
43+
fi
44+
}
45+
46+
start
47+
build_container
48+
description
49+
50+
msg_ok "Completed Successfully!\n"
51+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
52+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
53+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"

ct/asterisk.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: michelroegl-brunner
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://asterisk.org/
7+
8+
APP="Asterisk"
9+
var_tags="${var_tags:-telephone;pbx}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-2048}"
12+
var_disk="${var_disk:-4}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
msg_error "No Update function provided for ${APP} LXC"
27+
exit
28+
}
29+
30+
start
31+
build_container
32+
description
33+
34+
msg_ok "Completed Successfully!\n"
35+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"

ct/babybuddy.sh

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/babybuddy/babybuddy
7+
8+
APP="Baby Buddy"
9+
var_tags="${var_tags:-baby}"
10+
var_disk="${var_disk:-5}"
11+
var_cpu="${var_cpu:-2}"
12+
var_ram="${var_ram:-2048}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /opt/babybuddy ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
RELEASE=$(curl -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
32+
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/babybuddy_version.txt)" ]]; then
33+
setup_uv
34+
35+
msg_info "Stopping Services"
36+
systemctl stop nginx
37+
systemctl stop uwsgi
38+
msg_ok "Services Stopped"
39+
40+
msg_info "Cleaning old files"
41+
cp babybuddy/settings/production.py /tmp/production.py.bak
42+
find . -mindepth 1 -maxdepth 1 ! -name '.venv' -exec rm -rf {} +
43+
msg_ok "Cleaned old files"
44+
45+
msg_info "Updating ${APP} to v${RELEASE}"
46+
temp_file=$(mktemp)
47+
curl -fsSL "https://github.com/babybuddy/babybuddy/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
48+
cd /opt/babybuddy
49+
tar zxf "$temp_file" --strip-components=1 -C /opt/babybuddy
50+
mv /tmp/production.py.bak babybuddy/settings/production.py
51+
cd /opt/babybuddy
52+
source .venv/bin/activate
53+
$STD uv pip install -r requirements.txt
54+
$STD python manage.py migrate
55+
echo "${RELEASE}" >/opt/${APP}_version.txt
56+
msg_ok "Updated ${APP} to v${RELEASE}"
57+
58+
msg_info "Fixing permissions"
59+
chown -R www-data:www-data /opt/data
60+
chmod 640 /opt/data/db.sqlite3
61+
chmod 750 /opt/data
62+
msg_ok "Permissions fixed"
63+
64+
msg_info "Starting Services"
65+
systemctl start uwsgi
66+
systemctl start nginx
67+
msg_ok "Services Started"
68+
69+
msg_info "Cleaning up"
70+
rm -f "$temp_file"
71+
msg_ok "Cleaned"
72+
msg_ok "Updated Successfully"
73+
else
74+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
75+
fi
76+
exit
77+
}
78+
79+
start
80+
build_container
81+
description
82+
83+
msg_ok "Completed Successfully!\n"
84+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
85+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
86+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

0 commit comments

Comments
 (0)