diff --git a/ct/pulse.sh b/ct/pulse.sh index 2dabbec37..f4ec7cffb 100644 --- a/ct/pulse.sh +++ b/ct/pulse.sh @@ -34,28 +34,30 @@ function update_script() { fi RELEASE=$(curl -fsSL https://api.github.com/repos/rcourtman/Pulse/releases/latest | jq -r '.tag_name' | sed 's/^v//') + SERVICE_PATH="/etc/systemd/system" if [[ "${RELEASE}" != "$(cat ~/.pulse 2>/dev/null)" ]] || [[ ! -f ~/.pulse ]]; then msg_info "Stopping ${APP}" - systemctl stop pulse + systemctl stop pulse*.service msg_ok "Stopped ${APP}" - dirs=(/opt/pulse/bin /opt/pulse/frontend-modern) - for dir in "${dirs[@]}"; do - if [[ -d "$dir" ]]; then - rm -rf "$dir" - fi - done + if [[ -f /opt/pulse/pulse ]]; then + rm -f /opt/pulse/pulse + fi fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz" chown -R pulse:pulse /etc/pulse /opt/pulse - sed -i 's|bin/pulse|pulse|' /etc/systemd/system/pulse.service + if [[ -f "$SERVICE_PATH"/pulse.service ]]; then + mv "$SERVICE_PATH"/pulse.service "$SERVICE_PATH"/pulse-backend.service + fi + sed -i -e 's|pulse/pulse|pulse/bin/pulse|' \ + -e 's/^Environment="API.*$//' "$SERVICE_PATH"/pulse-backend.service systemctl daemon-reload if grep -q 'pulse-home:/bin/bash' /etc/passwd; then usermod -s /usr/sbin/nologin pulse fi msg_info "Starting ${APP}" - systemctl start pulse + systemctl start pulse-backend msg_ok "Started ${APP}" msg_ok "Updated Successfully" diff --git a/frontend/public/json/pulse.json b/frontend/public/json/pulse.json index a7d3aac39..20a5ae99f 100644 --- a/frontend/public/json/pulse.json +++ b/frontend/public/json/pulse.json @@ -39,6 +39,10 @@ { "text": "After installation, access the web interface to configure your Proxmox connection details through the built-in setup wizard", "type": "Info" + }, + { + "text": "Configure authentication in the Web UI => Settings => Security", + "type": "Info" } ] } diff --git a/install/pulse-install.sh b/install/pulse-install.sh index a4ec3bb9c..5a7f8f666 100644 --- a/install/pulse-install.sh +++ b/install/pulse-install.sh @@ -34,7 +34,7 @@ chown -R pulse:pulse /etc/pulse /opt/pulse msg_ok "Installed Pulse" msg_info "Creating Service" -cat </etc/systemd/system/pulse.service +cat </etc/systemd/system/pulse-backend.service [Unit] Description=Pulse Monitoring Server After=network.target @@ -44,7 +44,7 @@ Type=simple User=pulse Group=pulse WorkingDirectory=/opt/pulse -ExecStart=/opt/pulse/pulse +ExecStart=/opt/pulse/bin/pulse Restart=always RestartSec=3 StandardOutput=journal @@ -55,7 +55,7 @@ Environment="PULSE_DATA_DIR=/etc/pulse" [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now pulse +systemctl enable -q --now pulse-backend msg_ok "Created Service" motd_ssh