sparkyfitness: cleanup
This commit is contained in:
parent
3eb8147659
commit
7421d98513
@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/tomfrenzel/ProxmoxVED/main/misc/build.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: Tom Frenzel
|
# Author: Tom Frenzel
|
||||||
# License: MIT | https://github.com/tomfrenzel/ProxmoxVED/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
# Source: https://github.com/CodeWithCJ/SparkyFitness
|
# Source: https://github.com/CodeWithCJ/SparkyFitness
|
||||||
|
|
||||||
APP="SparkyFitness"
|
APP="SparkyFitness"
|
||||||
@ -29,6 +29,10 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
APP_SLUG="sparkyfitness"
|
||||||
|
APP_DIR="/opt/${APP_SLUG}"
|
||||||
|
WEB_DIR="/var/www/${APP_SLUG}"
|
||||||
|
|
||||||
NODE_VERSION="20" setup_nodejs
|
NODE_VERSION="20" setup_nodejs
|
||||||
|
|
||||||
if check_for_gh_release "sparkyfitness" "CodeWithCJ/SparkyFitness"; then
|
if check_for_gh_release "sparkyfitness" "CodeWithCJ/SparkyFitness"; then
|
||||||
@ -39,19 +43,19 @@ function update_script() {
|
|||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sparkyfitness" "CodeWithCJ/SparkyFitness" "tarball"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sparkyfitness" "CodeWithCJ/SparkyFitness" "tarball"
|
||||||
|
|
||||||
msg_info "Updating Sparky Fitness Backend"
|
msg_info "Updating Sparky Fitness Backend"
|
||||||
cd /opt/sparkyfitness/SparkyFitnessServer
|
cd "${APP_DIR}/SparkyFitnessServer"
|
||||||
$STD npm install
|
$STD npm install
|
||||||
msg_ok "Updated Sparky Fitness Backend"
|
msg_ok "Updated Sparky Fitness Backend"
|
||||||
|
|
||||||
msg_info "Updating Sparky Fitness Frontend"
|
msg_info "Updating Sparky Fitness Frontend"
|
||||||
cd /opt/sparkyfitness/SparkyFitnessFrontend
|
cd "${APP_DIR}/SparkyFitnessFrontend"
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
rm -rf /var/www/sparkyfitness/*
|
rm -rf "${WEB_DIR:?}"/*
|
||||||
cp -a /opt/sparkyfitness/SparkyFitnessFrontend/dist/. /var/www/sparkyfitness/
|
cp -a "${APP_DIR}/SparkyFitnessFrontend/dist/." "${WEB_DIR}/"
|
||||||
msg_ok "Updated Sparky Fitness Frontend"
|
msg_ok "Updated Sparky Fitness Frontend"
|
||||||
|
|
||||||
chown -R sparkyfitness:sparkyfitness /opt/sparkyfitness
|
chown -R sparkyfitness:sparkyfitness "${APP_DIR}"
|
||||||
|
|
||||||
msg_info "Starting Services"
|
msg_info "Starting Services"
|
||||||
$STD systemctl daemon-reload
|
$STD systemctl daemon-reload
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: tomfrenzel
|
# Author: tomfrenzel
|
||||||
# License: MIT | https://github.com/tomfrenzel/ProxmoxVED/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
# Source: https://github.com/CodeWithCJ/SparkyFitness
|
# Source: https://github.com/CodeWithCJ/SparkyFitness
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
@ -72,7 +72,6 @@ msg_info "Building Frontend"
|
|||||||
cd "${APP_DIR}/SparkyFitnessFrontend"
|
cd "${APP_DIR}/SparkyFitnessFrontend"
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
rm -rf "${WEB_DIR:?}"/*
|
|
||||||
cp -a "${APP_DIR}/SparkyFitnessFrontend/dist/." "${WEB_DIR}/"
|
cp -a "${APP_DIR}/SparkyFitnessFrontend/dist/." "${WEB_DIR}/"
|
||||||
msg_ok "Built Frontend"
|
msg_ok "Built Frontend"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user