Skip to content

Commit cbb1866

Browse files
authored
initial for PR (#1862)
1 parent c741817 commit cbb1866

File tree

3 files changed

+152
-0
lines changed

3 files changed

+152
-0
lines changed

ct/alpine-it-tools.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 -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: nicedevil007 (NiceDevil)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
7+
8+
# App Default Values
9+
APP="Alpine-IT-Tools"
10+
var_tags="alpine;development"
11+
var_cpu="1"
12+
var_ram="256"
13+
var_disk="0.2"
14+
var_os="alpine"
15+
var_version="3.21"
16+
var_unprivileged="1"
17+
18+
# App Output & Base Settings
19+
header_info "$APP"
20+
base_settings
21+
22+
# Core
23+
variables
24+
color
25+
catch_errors
26+
27+
function update_script() {
28+
header_info
29+
check_container_storage
30+
check_container_resources
31+
32+
if [[ ! -d /usr/share/nginx/html ]]; then
33+
msg_error "No ${APP} Installation Found!"
34+
exit
35+
fi
36+
37+
RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
38+
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
39+
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
40+
msg_info "Updating ${APP} LXC"
41+
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
42+
mkdir -p /usr/share/nginx/html
43+
rm -rf /usr/share/nginx/html/*
44+
unzip -q it-tools.zip -d /tmp/it-tools
45+
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
46+
rm -rf /tmp/it-tools
47+
rm -f it-tools.zip
48+
msg_ok "Updated Successfully"
49+
else
50+
msg_ok "No update required. ${APP} is already at ${RELEASE}"
51+
fi
52+
exit
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}${CL}"

install/alpine-it-tools-install.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: nicedevil007 (NiceDevil)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
7+
8+
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apk add \
18+
curl \
19+
mc \
20+
nginx \
21+
unzip
22+
msg_ok "Installed Dependencies"
23+
24+
msg_info "Installing IT-Tools"
25+
RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
26+
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
27+
28+
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
29+
mkdir -p /usr/share/nginx/html
30+
unzip -q it-tools.zip -d /tmp/it-tools
31+
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
32+
cat <<'EOF' > /etc/nginx/http.d/default.conf
33+
server {
34+
listen 80;
35+
server_name localhost;
36+
root /usr/share/nginx/html;
37+
index index.html;
38+
39+
location / {
40+
try_files $uri $uri/ /index.html;
41+
}
42+
}
43+
EOF
44+
$STD rc-update add nginx default
45+
$STD rc-service nginx start
46+
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
47+
msg_ok "Installed IT-Tools"
48+
49+
motd_ssh
50+
customize
51+
52+
msg_info "Cleaning up"
53+
rm -rf /tmp/it-tools
54+
rm -f it-tools.zip
55+
$STD apk cache clean
56+
msg_ok "Cleaned"

json/it-tools.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "IT-Tools",
3+
"slug": "it-tools",
4+
"categories": [
5+
20
6+
],
7+
"date_created": "2025-01-30",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 80,
12+
"documentation": null,
13+
"website": "https://github.com/CorentinTh/it-tools",
14+
"logo": "https://raw.githubusercontent.com/CorentinTh/it-tools/08d977b8cdb7ffb76adfa18ba6eb4b73795ec814/public/safari-pinned-tab.svg",
15+
"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.",
16+
"install_methods": [
17+
{
18+
"type": "alpine",
19+
"script": "ct/alpine-it-tools.sh",
20+
"resources": {
21+
"cpu": 1,
22+
"ram": 256,
23+
"hdd": 0.2,
24+
"os": "alpine",
25+
"version": "3.21"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": []
34+
}

0 commit comments

Comments
 (0)