2025-01-11 04:48:52 +00:00
|
|
|
#!/usr/bin/env bash
|
2025-01-11 22:18:45 +00:00
|
|
|
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
2025-01-11 06:20:03 +00:00
|
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
2025-01-11 04:48:52 +00:00
|
|
|
# Author: Jonathan (jd-apprentice)
|
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
|
|
# Source: https://opengist.io/
|
|
|
|
|
|
|
|
# App Default Values
|
|
|
|
APP="Opengist"
|
|
|
|
var_tags="development"
|
|
|
|
var_cpu="1"
|
|
|
|
var_ram="1024"
|
|
|
|
var_disk="8"
|
|
|
|
var_os="debian"
|
|
|
|
var_version="12"
|
|
|
|
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
|
2025-01-11 21:17:34 +00:00
|
|
|
if [[ ! -f /opt/opengist/opengist ]]; then
|
2025-01-11 04:48:52 +00:00
|
|
|
msg_error "No ${APP} Installation Found!"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
msg_info "Updating ${APP} LXC"
|
2025-01-11 05:39:33 +00:00
|
|
|
LATEST_URL=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | jq -r '.assets[] | select(.name | contains("linux-amd64.tar.gz")).browser_download_url')
|
|
|
|
wget "$LATEST_URL"
|
|
|
|
mv opengist*.tar.gz opengist.tar.gz
|
|
|
|
tar -xf opengist.tar.gz
|
|
|
|
mv opengist/opengist /opt/opengist/opengist
|
|
|
|
mv opengist/config.yml /opt/opengist/config.yml
|
2025-01-11 21:17:34 +00:00
|
|
|
chmod +x /opt/opengist/opengist
|
2025-01-11 05:39:33 +00:00
|
|
|
rm -rf opengist*
|
2025-01-11 04:48:52 +00:00
|
|
|
apt-get update &>/dev/null
|
|
|
|
apt-get -y upgrade &>/dev/null
|
|
|
|
msg_ok "Updated Successfully"
|
|
|
|
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 URL:${CL}"
|
2025-01-11 21:09:53 +00:00
|
|
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6157${CL}"
|