diff --git a/config/default_config.yaml b/config/default_config.yaml index 3298c57..04a1124 100644 --- a/config/default_config.yaml +++ b/config/default_config.yaml @@ -89,7 +89,7 @@ notify: # Notifications système macOS - platform: file name: "macOS Notifications" - filename: "/tmp/ha_notifications.log" + filename: "/Library/Logs/HomeAssistant/notifications.log" timestamp: true # Configuration de l'automatisation diff --git a/docs/OFFICIAL_MACOS_GUIDE.md b/docs/OFFICIAL_MACOS_GUIDE.md index c69f3e4..5c125be 100644 --- a/docs/OFFICIAL_MACOS_GUIDE.md +++ b/docs/OFFICIAL_MACOS_GUIDE.md @@ -191,7 +191,7 @@ bluetooth: notify: - platform: file name: macos_notifications - filename: /tmp/ha_notifications.log + filename: /Library/Logs/HomeAssistant/notifications.log ``` #### Appareils Externes diff --git a/scripts/postinstall b/scripts/postinstall index a2629ec..3359420 100755 --- a/scripts/postinstall +++ b/scripts/postinstall @@ -16,7 +16,9 @@ mkdir -p "$HA_LOG_DIR" # Attribution des droits au nouvel utilisateur système chown -R $USER_NAME:$GROUP_NAME "$HA_CONFIG_DIR" "$HA_LOG_DIR" >/dev/null 2>&1 || true -chmod -R 755 "$HA_CONFIG_DIR" "$HA_LOG_DIR" >/dev/null 2>&1 || true +chmod -R 755 "$HA_CONFIG_DIR" >/dev/null 2>&1 || true +# Permissions plus restrictives pour les logs (sécurité) +chmod -R 750 "$HA_LOG_DIR" >/dev/null 2>&1 || true # Droits sur l'installation dans /opt if [ -d "/opt/homeassistant" ]; then diff --git a/scripts/uninstall b/scripts/uninstall index 538bb08..8b830ae 100755 --- a/scripts/uninstall +++ b/scripts/uninstall @@ -109,8 +109,11 @@ fi # 10. Nettoyage des fichiers temporaires log_info "Nettoyage des fichiers temporaires..." +# Nettoyage des anciens fichiers temporaires (sécurité) rm -f /tmp/ha_notifications.log 2>/dev/null || true rm -rf /tmp/homeassistant-* 2>/dev/null || true +# Nettoyage du nouveau fichier de notifications +rm -f /Library/Logs/HomeAssistant/notifications.log 2>/dev/null || true # 11. Suppression des entrées launchd restantes log_info "Nettoyage des entrées launchd..."