fix(chat): truncate log message size

This commit is contained in:
Shivering Ocelot committed 2026-09-09 22:47:22 -05:00
1 parent 5fe7c91bb8
commit b324dc3a6b
4 files changed
+77 -12

No files matched your search

+15 -2
View File
@@ -3,6 +3,7 @@ set -euo pipefail
cd "$(dirname "$0")"
host="root@hub.hordelab.com"
remote_path="/var/horde/hub/"
run_nginx() {
echo "Uploading nginx config file"
@@ -43,6 +44,12 @@ run_update() {
"
}
run_dist() {
echo "Uploading frontend/dist to $host:/var/frontend/dist"
ssh "$host" "rm -rf $remote_path/frontend/dist && mkdir $remote_path/frontend/dist"
scp -r ../frontend/dist "$host:$remote_path/frontend/"
}
restart_service() {
echo "Restarting horde-hub.service"
ssh "$host" -t "systemctl restart horde-hub.service"
@@ -50,6 +57,7 @@ restart_service() {
# Determine which stages to run
stages=()
do_restart=0
if [[ $# -eq 0 ]]; then
# Interactive prompts when no arguments are given
read -p "Run nginx deployment? [Y/n] " choice
@@ -70,8 +78,12 @@ else
# Parse arguments
for arg in "$@"; do
case "$arg" in
nginx|service|update)
nginx|service|update|dist)
stages+=("$arg")
do_restart=1
;;
--dist)
stages+=("dist")
;;
*)
echo "Unknown argument: $arg" >&2
@@ -87,8 +99,9 @@ for stage in "${stages[@]}"; do
nginx) run_nginx ;;
service) run_service ;;
update) run_update ;;
dist) run_dist ;;
esac
done
# Final stage: always restart the systemd service at the end
restart_service
if [[ $do_restart -eq 1 ]]; then restart_service; fi