Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Ensure installer resets config ownership

rcourtmane69572d6f0f7
diff --git a/install.sh b/install.sh
index f9f39196fd..53547c6cff 100755
--- a/install.sh
+++ b/install.sh
@@ -2553,12 +2553,18 @@ setup_directories() {
chmod 700 "$CONFIG_DIR"
# Ensure critical config files retain proper permissions if they exist
- for config_file in "$CONFIG_DIR"/alerts.json "$CONFIG_DIR"/system.json "$CONFIG_DIR"/*.enc; do
+ for config_file in "$CONFIG_DIR"/alerts.json "$CONFIG_DIR"/system.json "$CONFIG_DIR"/*.enc "$CONFIG_DIR"/*.json; do
if [[ -f "$config_file" ]]; then
chown pulse:pulse "$config_file"
fi
done
+ for config_dir in "$CONFIG_DIR"/alerts "$CONFIG_DIR"/notifications; do
+ if [[ -d "$config_dir" ]]; then
+ chown -R pulse:pulse "$config_dir"
+ fi
+ done
+
# Create .env file with mock mode explicitly disabled (unless it already exists)
if [[ ! -f "$CONFIG_DIR/.env" ]]; then
cat > "$CONFIG_DIR/.env" << 'EOF'
@@ -2576,9 +2582,16 @@ PULSE_MOCK_MODE=false
#PULSE_MOCK_RANDOM_METRICS=true
#PULSE_MOCK_STOPPED_PERCENT=20
EOF
+ fi
+ if [[ -f "$CONFIG_DIR/.env" ]]; then
chown pulse:pulse "$CONFIG_DIR/.env"
chmod 600 "$CONFIG_DIR/.env"
fi
+
+ if [[ -f "$CONFIG_DIR/.encryption.key" ]]; then
+ chown pulse:pulse "$CONFIG_DIR/.encryption.key"
+ chmod 600 "$CONFIG_DIR/.encryption.key"
+ fi
}
setup_update_command() {