mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-13 07:10:51 +02:00
[Bug] | [Change]: Homarr (+Script harmonized) (#124)
* [Bug] | [Change]: Homarr (+Script harmonized) * Update ct/homarr.sh Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * add ttekc Signed-off-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * fix echo Signed-off-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> * Final Fix Signed-off-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> * remove cd /opt Signed-off-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --------- Signed-off-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
|
||||
# Copyright (c) 2021-2024 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# Co-Author: MickLesk (Canbiz)
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/ajnart/homarr
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@@ -17,7 +19,6 @@ 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 git
|
||||
$STD apt-get install -y ca-certificates
|
||||
$STD apt-get install -y gnupg
|
||||
msg_ok "Installed Dependencies"
|
||||
@@ -31,12 +32,14 @@ msg_ok "Set up Node.js Repository"
|
||||
msg_info "Installing Node.js/Yarn"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
$STD npm install -g npm@latest
|
||||
$STD npm install -g yarn
|
||||
msg_ok "Installed Node.js/Yarn"
|
||||
|
||||
msg_info "Installing Homarr (Patience)"
|
||||
$STD git clone -b dev https://github.com/ajnart/homarr.git /opt/homarr
|
||||
RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv homarr-${RELEASE} /opt/homarr
|
||||
cat <<EOF >/opt/homarr/.env
|
||||
DATABASE_URL="file:./database/db.sqlite"
|
||||
NEXTAUTH_URL="http://localhost:3000"
|
||||
@@ -48,6 +51,7 @@ cd /opt/homarr
|
||||
$STD yarn install
|
||||
$STD yarn build
|
||||
$STD yarn db:migrate
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Installed Homarr"
|
||||
|
||||
msg_info "Creating Service"
|
||||
@@ -72,6 +76,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf v${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
Reference in New Issue
Block a user