Skip to content

Commit f2bf6c9

Browse files
rcourtmanclaudeMickLesk
authored
make Pulse installation non-interactive (#4848)
* fix: streamline Pulse installation for web-based configuration - Remove all interactive prompts during installation - Remove .env setup (handled by web UI) - Remove configuration messages (handled by web UI) - Change install directory from /opt/pulse-proxmox to /opt/pulse - Update JSON note to reflect web-based setup wizard Pulse now features a complete web-based configuration system with automatic setup detection, making manual .env configuration obsolete. The new workflow: 1. Script installs Pulse without any user interaction 2. Service starts automatically 3. User navigates to the provided URL 4. Pulse shows setup wizard for configuration 5. No SSH or manual file editing required This provides the ideal community script experience - completely hands-off installation with configuration through the web interface. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Update pulse.sh to align with non-interactive installation - Change paths from /opt/pulse-proxmox to /opt/pulse - Remove .env file backup/restore logic since Pulse now uses web-based configuration - Simplify permissions setting to match new installation approach 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * little fixes * Update pulse.sh --------- Co-authored-by: Claude <[email protected]> Co-authored-by: CanbiZ <[email protected]>
1 parent 8d50a5d commit f2bf6c9

File tree

3 files changed

+31
-45
lines changed

3 files changed

+31
-45
lines changed

ct/pulse.sh

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
33
# Copyright (c) 2021-2025 community-scripts ORG
44
# Author: rcourtman
55
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@@ -23,40 +23,37 @@ function update_script() {
2323
header_info
2424
check_container_storage
2525
check_container_resources
26-
if [[ ! -d /opt/pulse-proxmox ]]; then
26+
if [[ ! -d /opt/pulse ]]; then
2727
msg_error "No ${APP} Installation Found!"
2828
exit
2929
fi
30+
if [[ -d /opt/pulse-monitor ]]; then
31+
msg_error "An old installation was detected. Please recreate the LXC from scratch (https://github.com/community-scripts/ProxmoxVE/pull/4848)"
32+
exit 1
33+
fi
3034
RELEASE=$(curl -fsSL https://api.github.com/repos/rcourtman/Pulse/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
3135
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
3236
msg_info "Stopping ${APP}"
33-
systemctl stop pulse-monitor
37+
systemctl stop pulse
3438
msg_ok "Stopped ${APP}"
3539

3640
msg_info "Updating Pulse"
37-
if [[ -f /opt/pulse-proxmox/.env ]]; then
38-
cp /opt/pulse-proxmox/.env /tmp/.env.backup.pulse
39-
fi
4041
temp_file=$(mktemp)
41-
mkdir -p /opt/pulse-proxmox
42-
rm -rf /opt/pulse-proxmox/*
42+
mkdir -p /opt/pulse
43+
rm -rf /opt/pulse/*
4344
curl -fsSL "https://github.com/rcourtman/Pulse/releases/download/v${RELEASE}/pulse-v${RELEASE}.tar.gz" -o "$temp_file"
44-
tar zxf "$temp_file" --strip-components=1 -C /opt/pulse-proxmox
45-
if [[ -f /tmp/.env.backup.pulse ]]; then
46-
mv /tmp/.env.backup.pulse /opt/pulse-proxmox/.env
47-
fi
45+
tar zxf "$temp_file" --strip-components=1 -C /opt/pulse
4846
echo "${RELEASE}" >/opt/${APP}_version.txt
4947
msg_ok "Updated Pulse to ${RELEASE}"
5048

51-
msg_info "Setting permissions for /opt/pulse-proxmox..."
52-
chown -R pulse:pulse "/opt/pulse-proxmox"
53-
find "/opt/pulse-proxmox" -type d -exec chmod 755 {} \;
54-
find "/opt/pulse-proxmox" -type f -exec chmod 644 {} \;
55-
chmod 600 /opt/pulse-proxmox/.env
49+
msg_info "Setting permissions for /opt/pulse..."
50+
chown -R pulse:pulse "/opt/pulse"
51+
find "/opt/pulse" -type d -exec chmod 755 {} \;
52+
find "/opt/pulse" -type f -exec chmod 644 {} \;
5653
msg_ok "Set permissions."
5754

5855
msg_info "Starting ${APP}"
59-
systemctl start pulse-monitor
56+
systemctl start pulse
6057
msg_ok "Started ${APP}"
6158
else
6259
msg_ok "No update required. ${APP} is already at ${RELEASE}."

frontend/public/json/pulse.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"documentation": null,
1313
"website": "https://github.com/rcourtman/Pulse",
1414
"logo": "https://raw.githubusercontent.com/rcourtman/Pulse/main/src/public/logos/pulse-logo-256x256.png",
15-
"config_path": "/opt/pulse-proxmox/.env",
15+
"config_path": "/opt/pulse/.env",
1616
"description": "A lightweight monitoring application for Proxmox VE that displays real-time status for VMs and containers via a simple web interface.",
1717
"install_methods": [
1818
{
@@ -35,6 +35,10 @@
3535
{
3636
"text": "Create Proxmox-API-Token first: `https://github.com/rcourtman/Pulse?tab=readme-ov-file#creating-a-proxmox-api-token`",
3737
"type": "Info"
38+
},
39+
{
40+
"text": "After installation, access the web interface to configure your Proxmox connection details through the built-in setup wizard",
41+
"type": "Info"
3842
}
3943
]
4044
}

install/pulse-install.sh

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ update_os
1717
msg_info "Installing Dependencies"
1818
$STD apt-get install -y \
1919
diffutils
20-
msg_ok "Installed Core Dependencies"
20+
msg_ok "Installed Dependencies"
2121

2222
msg_info "Creating dedicated user pulse..."
2323
if useradd -r -m -d /opt/pulse-home -s /bin/bash pulse; then
@@ -32,36 +32,21 @@ NODE_VERSION="20" install_node_and_modules
3232
msg_info "Setup Pulse"
3333
RELEASE=$(curl -fsSL https://api.github.com/repos/rcourtman/Pulse/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
3434
temp_file=$(mktemp)
35-
mkdir -p /opt/pulse-proxmox
35+
mkdir -p /opt/pulse
3636
curl -fsSL "https://github.com/rcourtman/Pulse/releases/download/v${RELEASE}/pulse-v${RELEASE}.tar.gz" -o "$temp_file"
37-
tar zxf "$temp_file" --strip-components=1 -C /opt/pulse-proxmox
37+
tar zxf "$temp_file" --strip-components=1 -C /opt/pulse
3838
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
3939
msg_ok "Installed Pulse"
4040

41-
read -rp "${TAB3}Proxmox Host (z. B. https://proxmox.example.com:8006): " PROXMOX_HOST
42-
read -rp "${TAB3}Proxmox Token ID (z. B. user@pam!mytoken): " PROXMOX_TOKEN_ID
43-
read -rp "${TAB3}Proxmox Token Secret: " PROXMOX_TOKEN_SECRET
44-
read -rp "${TAB3}Port (default: 7655): " PORT
45-
PORT="${PORT:-7655}"
4641

47-
msg_info "Creating .env file"
48-
cat <<EOF >/opt/pulse-proxmox/.env
49-
PROXMOX_HOST=${PROXMOX_HOST}
50-
PROXMOX_TOKEN_ID=${PROXMOX_TOKEN_ID}
51-
PROXMOX_TOKEN_SECRET=${PROXMOX_TOKEN_SECRET}
52-
PORT=${PORT}
53-
EOF
54-
msg_ok "Created .env file"
55-
56-
msg_info "Setting permissions for /opt/pulse-proxmox..."
57-
chown -R pulse:pulse "/opt/pulse-proxmox"
58-
find "/opt/pulse-proxmox" -type d -exec chmod 755 {} \;
59-
find "/opt/pulse-proxmox" -type f -exec chmod 644 {} \;
60-
chmod 600 /opt/pulse-proxmox/.env
42+
msg_info "Setting permissions for /opt/pulse..."
43+
chown -R pulse:pulse "/opt/pulse"
44+
find "/opt/pulse" -type d -exec chmod 755 {} \;
45+
find "/opt/pulse" -type f -exec chmod 644 {} \;
6146
msg_ok "Set permissions."
6247

6348
msg_info "Creating Service"
64-
cat <<EOF >/etc/systemd/system/pulse-monitor.service
49+
cat <<EOF >/etc/systemd/system/pulse.service
6550
[Unit]
6651
Description=Pulse Monitoring Application
6752
After=network.target
@@ -70,8 +55,8 @@ After=network.target
7055
Type=simple
7156
User=pulse
7257
Group=pulse
73-
WorkingDirectory=/opt/pulse-proxmox
74-
EnvironmentFile=/opt/pulse-proxmox/.env
58+
WorkingDirectory=/opt/pulse
59+
EnvironmentFile=/opt/pulse/.env
7560
ExecStart=/usr/bin/npm run start
7661
Restart=on-failure
7762
RestartSec=5
@@ -81,7 +66,7 @@ StandardError=journal
8166
[Install]
8267
WantedBy=multi-user.target
8368
EOF
84-
systemctl enable -q --now pulse-monitor
69+
systemctl enable -q --now pulse
8570
msg_ok "Created Service"
8671

8772
motd_ssh

0 commit comments

Comments
 (0)