Fix a false Nextcloud health warning
Two compounding bugs: the check looked for an autostart entry named "nextcloud.desktop", but current nextcloud-client packages ship it Title-cased as "Nextcloud.desktop" -- a case-sensitive filesystem never matched, so it always reported "autostart is not configured" even with autostart genuinely on. Made the lookup case-insensitive so a future package rename doesn't reintroduce this. Second, even past that, it ran systemctl against "nextcloud.service" -- a unit that doesn't exist in either scope, because the client is a plain autostarted process with no systemd unit behind it at all (same reasoning as the RustDesk autostart.lua comment, different shape: no service to query rather than the wrong scope). Added a process_check helper alongside the existing service_check and switched Nextcloud to it; confirmed live it now reports "Process is running." Claude-Session: https://claude.ai/code/session_01E6TJUAh41HaP25MVHWkhRZ
This commit is contained in:
@@ -86,7 +86,7 @@ EOF
|
||||
chmod +x "$bin_dir/panama-brightness"
|
||||
|
||||
mkdir -p "$config_home/autostart"
|
||||
touch "$config_home/autostart/nextcloud.desktop"
|
||||
touch "$config_home/autostart/Nextcloud.desktop"
|
||||
for name in hypr quickshell uwsm vicinae; do
|
||||
ln -s "$repo_dir/config/dot/$name" "$config_home/$name"
|
||||
done
|
||||
@@ -209,14 +209,16 @@ check_status "$missing_qs" desktop.quickshell error
|
||||
mv "$bin_dir/qs.off" "$bin_dir/qs"
|
||||
|
||||
# Optional integrations stay neutral until the user configures them.
|
||||
rm "$config_home/autostart/nextcloud.desktop"
|
||||
rm "$config_home/autostart/Nextcloud.desktop"
|
||||
unconfigured_nextcloud="$(run_doctor --json)"
|
||||
check_status "$unconfigured_nextcloud" integration.nextcloud unconfigured
|
||||
touch "$config_home/autostart/nextcloud.desktop"
|
||||
touch "$config_home/autostart/Nextcloud.desktop"
|
||||
|
||||
# A configured integration that stopped is actionable with an authored label,
|
||||
# never an application name or command derived from probe output.
|
||||
stopped_nextcloud="$(PANAMA_DOCTOR_FIXTURE_STOPPED=nextcloud.service run_doctor --json)"
|
||||
# A configured integration whose process isn't running is actionable with an
|
||||
# authored label, never an application name or command derived from probe
|
||||
# output. Nextcloud has no systemd unit behind it, so this is a process
|
||||
# check (PANAMA_DOCTOR_FIXTURE_PROCESSES), not a service check.
|
||||
stopped_nextcloud="$(PANAMA_DOCTOR_FIXTURE_PROCESSES=nextcloud:missing run_doctor --json)"
|
||||
check_status "$stopped_nextcloud" integration.nextcloud warning
|
||||
jq -e '.checks[] | select(.id == "integration.nextcloud")
|
||||
| .action == {kind:"open", label:"Open Nextcloud", confirm:false}' \
|
||||
|
||||
Reference in New Issue
Block a user