parent
d934d1b51b
commit
e2a310dd3a
@ -27,16 +27,15 @@ function update_script() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
|
RELEASE=$(curl -fsSL https://api.github.com/repos/sharevb/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
|
||||||
if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then
|
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"
|
msg_info "Updating ${APP} LXC"
|
||||||
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
|
curl -fsSL "https://github.com/sharevb/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" -o it-tools.zip
|
||||||
mkdir -p /usr/share/nginx/html
|
mkdir -p /usr/share/nginx/html
|
||||||
rm -rf /usr/share/nginx/html/*
|
rm -rf /usr/share/nginx/html/*
|
||||||
$STD unzip it-tools.zip -d /tmp/it-tools
|
$STD unzip it-tools.zip -d /tmp
|
||||||
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
|
cp -r /tmp/dist/* /usr/share/nginx/html
|
||||||
rm -rf /tmp/it-tools
|
rm -rf /tmp/dist
|
||||||
rm -f it-tools.zip
|
rm -f it-tools.zip
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
else
|
else
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 80,
|
"interface_port": 80,
|
||||||
"documentation": null,
|
"documentation": null,
|
||||||
"website": "https://it-tools.tech/",
|
"website": "https://sharevb-it-tools.vercel.app/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/it-tools.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/it-tools.webp",
|
||||||
"config_path": "",
|
"config_path": "",
|
||||||
"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.",
|
"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.",
|
||||||
|
@ -14,17 +14,17 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apk add nginx
|
$STD apk add --no-cache \
|
||||||
|
nginx \
|
||||||
|
python3
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing IT-Tools"
|
msg_info "Installing IT-Tools"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
|
RELEASE=$(curl -fsSL https://api.github.com/repos/sharevb/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 "https://github.com/sharevb/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" -o it-tools.zip
|
||||||
|
|
||||||
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
|
|
||||||
mkdir -p /usr/share/nginx/html
|
mkdir -p /usr/share/nginx/html
|
||||||
$STD unzip it-tools.zip -d /tmp/it-tools
|
$STD unzip it-tools.zip -d /tmp/
|
||||||
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
|
mv /tmp/dist/* /usr/share/nginx/html
|
||||||
cat <<'EOF' >/etc/nginx/http.d/default.conf
|
cat <<'EOF' >/etc/nginx/http.d/default.conf
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
@ -39,14 +39,14 @@ server {
|
|||||||
EOF
|
EOF
|
||||||
$STD rc-update add nginx default
|
$STD rc-update add nginx default
|
||||||
$STD rc-service nginx start
|
$STD rc-service nginx start
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
||||||
msg_ok "Installed IT-Tools"
|
msg_ok "Installed IT-Tools"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -rf /tmp/it-tools
|
rm -rf /tmp/dist
|
||||||
rm -f it-tools.zip
|
rm -f it-tools.zip
|
||||||
$STD apk cache clean
|
$STD apk cache clean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user