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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user