Skip to content

Commit 1ebb178

Browse files
authored
Give more disk space to LXC (#4288)
1 parent cce3ca1 commit 1ebb178

File tree

4 files changed

+107
-107
lines changed

4 files changed

+107
-107
lines changed

ct/alpine-it-tools.sh

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ APP="Alpine-IT-Tools"
99
var_tags="${var_tags:-alpine;development}"
1010
var_cpu="${var_cpu:-1}"
1111
var_ram="${var_ram:-256}"
12-
var_disk="${var_disk:-0.2}"
12+
var_disk="${var_disk:-0.5}"
1313
var_os="${var_os:-alpine}"
1414
var_version="${var_version:-3.21}"
1515
var_unprivileged="${var_unprivileged:-1}"
@@ -20,32 +20,32 @@ color
2020
catch_errors
2121

2222
function update_script() {
23-
header_info
24-
check_container_storage
25-
check_container_resources
26-
27-
if [ ! -d /usr/share/nginx/html ]; then
28-
msg_error "No ${APP} Installation Found!"
29-
exit 1
30-
fi
31-
32-
RELEASE=$(curl -fsSL https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
33-
if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then
34-
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
35-
msg_info "Updating ${APP} LXC"
36-
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
37-
mkdir -p /usr/share/nginx/html
38-
rm -rf /usr/share/nginx/html/*
39-
unzip -q it-tools.zip -d /tmp/it-tools
40-
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
41-
rm -rf /tmp/it-tools
42-
rm -f it-tools.zip
43-
msg_ok "Updated Successfully"
44-
else
45-
msg_ok "No update required. ${APP} is already at ${RELEASE}"
46-
fi
47-
48-
exit 0
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [ ! -d /usr/share/nginx/html ]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit 1
30+
fi
31+
32+
RELEASE=$(curl -fsSL https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
33+
if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then
34+
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
35+
msg_info "Updating ${APP} LXC"
36+
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
37+
mkdir -p /usr/share/nginx/html
38+
rm -rf /usr/share/nginx/html/*
39+
unzip -q it-tools.zip -d /tmp/it-tools
40+
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
41+
rm -rf /tmp/it-tools
42+
rm -f it-tools.zip
43+
msg_ok "Updated Successfully"
44+
else
45+
msg_ok "No update required. ${APP} is already at ${RELEASE}"
46+
fi
47+
48+
exit 0
4949
}
5050

5151
start
@@ -55,4 +55,4 @@ description
5555
msg_ok "Completed Successfully!\n"
5656
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
5757
echo -e "${INFO}${YW} Access it using the following IP:${CL}"
58-
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
58+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

ct/alpine.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ APP="Alpine"
99
var_tags="${var_tags:-os;alpine}"
1010
var_cpu="${var_cpu:-1}"
1111
var_ram="${var_ram:-512}"
12-
var_disk="${var_disk:-0.1}"
12+
var_disk="${var_disk:-0.5}"
1313
var_os="${var_os:-alpine}"
1414
var_version="${var_version:-3.21}"
1515
var_unprivileged="${var_unprivileged:-1}"
@@ -20,9 +20,11 @@ color
2020
catch_errors
2121

2222
function update_script() {
23-
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \
24-
"1" "Check for Alpine Updates" ON \
25-
3>&1 1>&2 2>&3)
23+
UPD=$(
24+
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \
25+
"1" "Check for Alpine Updates" ON \
26+
3>&1 1>&2 2>&3
27+
)
2628

2729
header_info
2830
if [ "$UPD" == "1" ]; then
@@ -35,4 +37,4 @@ start
3537
build_container
3638
description
3739

38-
msg_ok "Completed Successfully!\n"
40+
msg_ok "Completed Successfully!\n"

frontend/public/json/alpine-it-tools.json

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Alpine-IT-Tools",
33
"slug": "alpine-it-tools",
44
"categories": [
5-
20
5+
20
66
],
77
"date_created": "2025-01-30",
88
"type": "ct",
@@ -15,33 +15,32 @@
1515
"config_path": "",
1616
"description": "IT-Tools is a web-based suite of utilities designed to streamline and simplify various IT tasks, providing tools for developers and system administrators to manage their workflows efficiently.",
1717
"install_methods": [
18-
{
19-
"type": "default",
20-
"script": "ct/alpine-it-tools.sh",
21-
"resources": {
22-
"cpu": 1,
23-
"ram": 256,
24-
"hdd": 0.2,
25-
"os": "alpine",
26-
"version": "3.21"
27-
}
28-
},
29-
{
30-
"type": "alpine",
31-
"script": "ct/alpine-it-tools.sh",
32-
"resources": {
33-
"cpu": 1,
34-
"ram": 256,
35-
"hdd": 0.2,
36-
"os": "alpine",
37-
"version": "3.21"
38-
}
18+
{
19+
"type": "default",
20+
"script": "ct/alpine-it-tools.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 256,
24+
"hdd": 0.5,
25+
"os": "alpine",
26+
"version": "3.21"
3927
}
28+
},
29+
{
30+
"type": "alpine",
31+
"script": "ct/alpine-it-tools.sh",
32+
"resources": {
33+
"cpu": 1,
34+
"ram": 256,
35+
"hdd": 0.5,
36+
"os": "alpine",
37+
"version": "3.21"
38+
}
39+
}
4040
],
4141
"default_credentials": {
42-
"username": null,
43-
"password": null
42+
"username": null,
43+
"password": null
4444
},
4545
"notes": []
4646
}
47-

frontend/public/json/alpine.json

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,51 @@
11
{
2-
"name": "Alpine",
3-
"slug": "alpine",
4-
"categories": [
5-
2
6-
],
7-
"date_created": "2024-05-02",
8-
"type": "ct",
9-
"updateable": false,
10-
"privileged": false,
11-
"interface_port": null,
12-
"documentation": null,
13-
"website": "https://www.alpinelinux.org/",
14-
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/alpinelinux.svg",
15-
"config_path": "",
16-
"description": "A security-oriented, lightweight Linux distribution based on musl and BusyBox.\r\nBy default, the root password is set to alpine. If you choose to use advanced settings, you will need to define a password, autologin is currently unavailable.",
17-
"install_methods": [
18-
{
19-
"type": "default",
20-
"script": "ct/alpine.sh",
21-
"resources": {
22-
"cpu": 1,
23-
"ram": 512,
24-
"hdd": 0.1,
25-
"os": "alpine",
26-
"version": "3.21"
27-
}
28-
},
29-
{
30-
"type": "alpine",
31-
"script": "ct/alpine.sh",
32-
"resources": {
33-
"cpu": 1,
34-
"ram": 512,
35-
"hdd": 0.1,
36-
"os": "alpine",
37-
"version": "3.21"
38-
}
39-
}
40-
],
41-
"default_credentials": {
42-
"username": null,
43-
"password": "alpine"
2+
"name": "Alpine",
3+
"slug": "alpine",
4+
"categories": [
5+
2
6+
],
7+
"date_created": "2024-05-02",
8+
"type": "ct",
9+
"updateable": false,
10+
"privileged": false,
11+
"interface_port": null,
12+
"documentation": null,
13+
"website": "https://www.alpinelinux.org/",
14+
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/alpinelinux.svg",
15+
"config_path": "",
16+
"description": "A security-oriented, lightweight Linux distribution based on musl and BusyBox.\r\nBy default, the root password is set to alpine. If you choose to use advanced settings, you will need to define a password, autologin is currently unavailable.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/alpine.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 512,
24+
"hdd": 0.5,
25+
"os": "alpine",
26+
"version": "3.21"
27+
}
4428
},
45-
"notes": [
46-
{
47-
"text": "To Update Alpine: `apk update && apk upgrade`",
48-
"type": "info"
49-
}
50-
]
29+
{
30+
"type": "alpine",
31+
"script": "ct/alpine.sh",
32+
"resources": {
33+
"cpu": 1,
34+
"ram": 512,
35+
"hdd": 0.5,
36+
"os": "alpine",
37+
"version": "3.21"
38+
}
39+
}
40+
],
41+
"default_credentials": {
42+
"username": null,
43+
"password": "alpine"
44+
},
45+
"notes": [
46+
{
47+
"text": "To Update Alpine: `apk update && apk upgrade`",
48+
"type": "info"
49+
}
50+
]
5151
}
52-

0 commit comments

Comments
 (0)