title: Mac OS X: Refreshing service menus works in Terminal but not in post-install-script
body: <p>I have an OSX application providing a service menu to other applications. This works fine so far, the menu is activated and available after a user installed the app and logged out and back in.  (<a href="https://stackoverflow.com/questions/3859747/how-do-i-automatically-activate-an-item-in-the-os-x-services-menu">see similiar post</a>)</p>
  
  <p>I know the log-out-and-back-in is obsolete when triggering the service menu agent (pbs) to scan for changed services by opening a terminal and running
      /System/Library/CoreServices/pbs
  (this also works without having the new application launched even once)</p>
  
  <p>So I´d like to provide an installer (.pkg) which runs "pbs" as post-install script. Suprisingly, running "bps" as post-install only works if the application was launched before e.g.:
      #! /bin/sh</p>
  
  <pre><code>sleep 3
  open /Applications/MyApp.app
  sleep 3
  /System/Library/CoreServices/pbs
  exit 0
  </code></pre>
  
  <p>Unfortunately, (due to application specific reasons) I do not want to start my application directly from the installer. Does anyone know why the post-install-scrips behaves different than the Terminal? </p>