Update cm4-dashboard.service to include CM4_PROVISIONING_DIR environment variable and modify deploy-dashboard-to-lxc.sh to install systemd unit before restarting the service, enhancing deployment process and configuration management.

This commit is contained in:
nearxos
2026-02-20 08:52:39 +02:00
parent 42bacad329
commit 97d55a1f90
2 changed files with 4 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ for f in "$DASHBOARD_DIR"/templates/*; do
[[ -f "$f" ]] && scp -q "$f" "$LXC:$REMOTE_DIR/templates/"
done
echo "Restarting cm4-dashboard service ..."
ssh "$LXC" "systemctl restart cm4-dashboard && systemctl is-active --quiet cm4-dashboard && echo 'Dashboard restarted and running.'"
echo "Installing systemd unit and restarting ..."
ssh "$LXC" "cp $REMOTE_DIR/cm4-dashboard.service /etc/systemd/system/ && systemctl daemon-reload && systemctl restart cm4-dashboard && systemctl is-active --quiet cm4-dashboard && echo 'Dashboard restarted and running.'"
echo "Done. Dashboard at http://$(echo "$LXC" | cut -d@ -f2):5000"