mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-02-01 14:31:50 +00:00
initial for PR (#1862)
This commit is contained in:
parent
c7418171b4
commit
cbb18668dd
62
ct/alpine-it-tools.sh
Normal file
62
ct/alpine-it-tools.sh
Normal file
@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: nicedevil007 (NiceDevil)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
|
||||
# App Default Values
|
||||
APP="Alpine-IT-Tools"
|
||||
var_tags="alpine;development"
|
||||
var_cpu="1"
|
||||
var_ram="256"
|
||||
var_disk="0.2"
|
||||
var_os="alpine"
|
||||
var_version="3.21"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /usr/share/nginx/html ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
|
||||
msg_info "Updating ${APP} LXC"
|
||||
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
|
||||
mkdir -p /usr/share/nginx/html
|
||||
rm -rf /usr/share/nginx/html/*
|
||||
unzip -q it-tools.zip -d /tmp/it-tools
|
||||
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
|
||||
rm -rf /tmp/it-tools
|
||||
rm -f it-tools.zip
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
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} Access it using the following IP:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
56
install/alpine-it-tools-install.sh
Normal file
56
install/alpine-it-tools-install.sh
Normal file
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: nicedevil007 (NiceDevil)
|
||||
# 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 \
|
||||
curl \
|
||||
mc \
|
||||
nginx \
|
||||
unzip
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing IT-Tools"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
|
||||
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
|
||||
|
||||
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
|
||||
mkdir -p /usr/share/nginx/html
|
||||
unzip -q it-tools.zip -d /tmp/it-tools
|
||||
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
|
||||
cat <<'EOF' > /etc/nginx/http.d/default.conf
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
$STD rc-update add nginx default
|
||||
$STD rc-service nginx start
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed IT-Tools"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /tmp/it-tools
|
||||
rm -f it-tools.zip
|
||||
$STD apk cache clean
|
||||
msg_ok "Cleaned"
|
34
json/it-tools.json
Normal file
34
json/it-tools.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "IT-Tools",
|
||||
"slug": "it-tools",
|
||||
"categories": [
|
||||
20
|
||||
],
|
||||
"date_created": "2025-01-30",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": null,
|
||||
"website": "https://github.com/CorentinTh/it-tools",
|
||||
"logo": "https://raw.githubusercontent.com/CorentinTh/it-tools/08d977b8cdb7ffb76adfa18ba6eb4b73795ec814/public/safari-pinned-tab.svg",
|
||||
"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.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "alpine",
|
||||
"script": "ct/alpine-it-tools.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 256,
|
||||
"hdd": 0.2,
|
||||
"os": "alpine",
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user