[OS X] LaunchDaemon override issue forcing Server launch at startup

Issue #916 resolved
Former user created an issue

This is discussed here:

Serviio post-install .pkg script command invokes load -w which sets an override (false) to Disable key in /var/db/com.apple.xpc.launchd/disabled.plist

Therefore, it is impossible to disable Server launch at startup even if Disable key is set into /Library/LaunchDaemons/org.serviio.server.plist as per WIKI instruction

Post install Script should be changed into:

#!/bin/bash

SERVIIO_PLIST="/Library/LaunchDaemons/org.serviio.server.plist"

# Load and start the launch daemon
/bin/launchctl load -F $SERVIIO_PLIST

-F option forces launch, even if daemon is set as disabled, but without setting the override.

Notes:

  1. Previous Serviio users may still encounter the issue after that change, as it is not possible to remove the override once set!... (Yosemite & later "feature"). To remove the override, some operations have to be made under Recovery or single mode (check forum thread). New users will be safe.
  2. FAQ instructions to manually launch/stop the Server should be updated here too to launch with -F option (making sure launch works even if user sets Disable flag as per wiki).
  3. Maybe Wiki article should be merged with previous FAQ for consistency on similar theme.
  4. This issue potentially affected previous versions (1.5.2 at least).

Comments (3)

  1. Former user Account Deleted

    About my previous Note 1, it turns-out that there is no need to edit things manually under Recovery or Safe Mode. Override can be safely removed by the following command:

    sudo defaults delete /var/db/com.apple.xpc.launchd/disabled.plist org.serviio.server
    

    You may want to add this in the updated Installer post-install script: this would fix the issue for users who installed previous Serviio versions, and were hit by the -w option which did set permanently the override.

    From a same spirit, setting/resetting the Disabled key in /Library/LaunchDaemons/org.serviio.server.plist can be done with similar kind of sudo commands. It is probably a better & safer suggestion to put in the Wiki/FAQ, instead of having users manually edit such kind of files.

  2. Log in to comment