mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-11 18:04:38 +00:00
* fix: update Pulse scripts for v4 Go rewrite support - Update install script to download universal package - Update update_script to preserve data directory during updates - Remove Node.js dependencies and use built-in installer - Scripts now support v4 (Go) architecture * Update pulse-install.sh * refactor: use community-scripts helper functions - Use fetch_and_deploy_gh_release as requested - Add architecture detection for multi-arch support - Simplify update script to use helper functions - Remove unnecessary code and keep it minimal * fix: use correct PULSE_DATA_DIR environment variable Changed from PULSE_CONFIG_DIR to PULSE_DATA_DIR to match what Pulse v4.0.3 actually uses. The default is /etc/pulse anyway, but being explicit ensures consistency. * fix update * fix install * address review comments: add version file creation * remove * fix: update version file after successful update * Update pulse.sh --------- Co-authored-by: Pulse Monitor <pulse@pulse-monitor.dev> Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: rcourtman <rcourtman@github.com> Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
66 lines
1.4 KiB
Bash
66 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
|
# Author: rcourtman
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/rcourtman/Pulse
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
msg_info "Installing Dependencies"
|
|
$STD apt-get install -y \
|
|
diffutils \
|
|
policykit-1
|
|
msg_ok "Installed Dependencies"
|
|
|
|
msg_info "Creating User"
|
|
if useradd -r -m -d /opt/pulse-home -s /bin/bash pulse; then
|
|
msg_ok "Created User"
|
|
else
|
|
msg_error "User creation failed"
|
|
exit 1
|
|
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
|
|
msg_ok "Installed Pulse"
|
|
|
|
msg_info "Creating Service"
|
|
cat <<EOF >/etc/systemd/system/pulse.service
|
|
[Unit]
|
|
Description=Pulse Monitoring Server
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=pulse
|
|
Group=pulse
|
|
WorkingDirectory=/opt/pulse
|
|
ExecStart=/opt/pulse/pulse
|
|
Restart=always
|
|
RestartSec=3
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
Environment="PULSE_DATA_DIR=/etc/pulse"
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl enable -q --now pulse
|
|
msg_ok "Created Service"
|
|
|
|
motd_ssh
|
|
customize
|
|
|
|
msg_info "Cleaning up"
|
|
$STD apt-get -y autoremove
|
|
$STD apt-get -y autoclean
|
|
msg_ok "Cleaned"
|