mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Homepage: Bugfix for v1.0.0 (#3092)
* (for revert)modify func files * KSS
This commit is contained in:
		@@ -8,8 +8,8 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
 | 
				
			|||||||
APP="Homepage"
 | 
					APP="Homepage"
 | 
				
			||||||
var_tags="dashboard"
 | 
					var_tags="dashboard"
 | 
				
			||||||
var_cpu="2"
 | 
					var_cpu="2"
 | 
				
			||||||
var_ram="1024"
 | 
					var_ram="4096"
 | 
				
			||||||
var_disk="3"
 | 
					var_disk="6"
 | 
				
			||||||
var_os="debian"
 | 
					var_os="debian"
 | 
				
			||||||
var_version="12"
 | 
					var_version="12"
 | 
				
			||||||
var_unprivileged="1"
 | 
					var_unprivileged="1"
 | 
				
			||||||
@@ -35,6 +35,7 @@ function update_script() {
 | 
				
			|||||||
      echo "Installed NPM..."
 | 
					      echo "Installed NPM..."
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					  LOCAL_IP=$(hostname -I | awk '{print $1}')
 | 
				
			||||||
  RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
					  RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
  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
 | 
				
			||||||
    msg_info "Updating Homepage to v${RELEASE} (Patience)"
 | 
					    msg_info "Updating Homepage to v${RELEASE} (Patience)"
 | 
				
			||||||
@@ -49,7 +50,11 @@ function update_script() {
 | 
				
			|||||||
    $STD npx --yes update-browserslist-db@latest
 | 
					    $STD npx --yes update-browserslist-db@latest
 | 
				
			||||||
    export NEXT_PUBLIC_VERSION="v$RELEASE"
 | 
					    export NEXT_PUBLIC_VERSION="v$RELEASE"
 | 
				
			||||||
    export NEXT_PUBLIC_REVISION="source"
 | 
					    export NEXT_PUBLIC_REVISION="source"
 | 
				
			||||||
 | 
					    export NEXT_TELEMETRY_DISABLED=1
 | 
				
			||||||
    $STD pnpm build
 | 
					    $STD pnpm build
 | 
				
			||||||
 | 
					    if [[ ! -f /opt/homepage/.env ]]; then
 | 
				
			||||||
 | 
					        echo "HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP}:3000" > /opt/homepage/.env
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
    systemctl start homepage
 | 
					    systemctl start homepage
 | 
				
			||||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
					    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
				
			||||||
    msg_ok "Updated Homepage to v${RELEASE}"
 | 
					    msg_ok "Updated Homepage to v${RELEASE}"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,10 +14,10 @@ network_check
 | 
				
			|||||||
update_os
 | 
					update_os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Installing Dependencies"
 | 
					msg_info "Installing Dependencies"
 | 
				
			||||||
$STD apt-get install -y curl
 | 
					$STD apt-get install -y curl \
 | 
				
			||||||
$STD apt-get install -y sudo
 | 
					    sudo \
 | 
				
			||||||
$STD apt-get install -y mc
 | 
					    mc \
 | 
				
			||||||
$STD apt-get install -y gpg
 | 
					    gpg
 | 
				
			||||||
msg_ok "Installed Dependencies"
 | 
					msg_ok "Installed Dependencies"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
msg_info "Setting up Node.js Repository"
 | 
					msg_info "Setting up Node.js Repository"
 | 
				
			||||||
@@ -32,6 +32,7 @@ $STD apt-get install -y nodejs
 | 
				
			|||||||
$STD npm install -g pnpm
 | 
					$STD npm install -g pnpm
 | 
				
			||||||
msg_ok "Installed Node.js"
 | 
					msg_ok "Installed Node.js"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					LOCAL_IP=$(hostname -I | awk '{print $1}')
 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
					RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
				
			||||||
msg_info "Installing Homepage v${RELEASE} (Patience)"
 | 
					msg_info "Installing Homepage v${RELEASE} (Patience)"
 | 
				
			||||||
wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz
 | 
					wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz
 | 
				
			||||||
@@ -45,7 +46,9 @@ cp /opt/homepage/src/skeleton/* /opt/homepage/config
 | 
				
			|||||||
$STD pnpm install
 | 
					$STD pnpm install
 | 
				
			||||||
export NEXT_PUBLIC_VERSION="v$RELEASE"
 | 
					export NEXT_PUBLIC_VERSION="v$RELEASE"
 | 
				
			||||||
export NEXT_PUBLIC_REVISION="source"
 | 
					export NEXT_PUBLIC_REVISION="source"
 | 
				
			||||||
 | 
					export NEXT_TELEMETRY_DISABLED=1
 | 
				
			||||||
$STD pnpm build
 | 
					$STD pnpm build
 | 
				
			||||||
 | 
					echo "HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP}:3000" > /opt/homepage/.env
 | 
				
			||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
					echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
				
			||||||
msg_ok "Installed Homepage v${RELEASE}"
 | 
					msg_ok "Installed Homepage v${RELEASE}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,8 +19,8 @@
 | 
				
			|||||||
            "script": "ct/homepage.sh",
 | 
					            "script": "ct/homepage.sh",
 | 
				
			||||||
            "resources": {
 | 
					            "resources": {
 | 
				
			||||||
                "cpu": 2,
 | 
					                "cpu": 2,
 | 
				
			||||||
                "ram": 1024,
 | 
					                "ram": 4096,
 | 
				
			||||||
                "hdd": 3,
 | 
					                "hdd": 6,
 | 
				
			||||||
                "os": "debian",
 | 
					                "os": "debian",
 | 
				
			||||||
                "version": "12"
 | 
					                "version": "12"
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@@ -34,6 +34,10 @@
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            "text": "Configuration (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/`",
 | 
					            "text": "Configuration (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/`",
 | 
				
			||||||
            "type": "info"
 | 
					            "type": "info"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "text": "Add additional allowed hosts to `/opt/homepage/.env`",
 | 
				
			||||||
 | 
					            "type": "info"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user