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