Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

launchd

  1. Buadhai

    macOS Launchd runs old scripts, but won't run new scripts

    I'm sure this is something simple. Be that as it may, I can't figure it out. I've been writing simple shell scripts for years that I run via launchd plist files created with Lingon. Generally that works fine unless I do something stupid which is not all that rare. However, after installing...
  2. Buadhai

    macOS Run A Shell Script via Launchd When Laptop Lid is Closed

    I'd like to run a shell script every night using launchd when the laptop (M1 MBA) lid is closed. I can ssh in to the machine when the lid is closed and run the script from the command line. But running via launchd doesn't seem to work.
  3. maverick28

    Launchd. Console reports undefined properties for a job

    The property in question is AfterInitialDemand. The screenshot of the job is below. The question is what exactly AfterInitialDemand is for apart from the formal definition reading that it's a sub-key overriding KeepAlive, RunAtLoad, WatchPaths and StartCalendarInterval keys and making the job...
  4. maverick28

    macOS Create an agent to watch program launches

    Hello, I want to create an agent that would launch a certain script when iTunes is launched. Obviously, with the traditional set of properties such as KeepAlive and RunAtLoad it will resume endlessly as soon as the default 10-sec interval elapses which is not the desired behaviour as I need it...
  5. daveh0

    macOS Can't authenticate using SSH key when running script via launchd

    I have a Bash script that executes an rsync command to sync files with a remote server. #!/bin/bash rsync -auvzP --exclude=.bundle --exclude=node_modules --exclude=tmp '/Volumes/Norman Data/me/.bash_profile' '/Volumes/Norman Data/me/Documents' --exclude=remote me@example.com:backup/ This...
  6. B

    macOS Alternative to bootstrap_info()

    Hello, I'm writing a program to enumerate port information and I came across some documents that referenced bootstrap_info() API, however it seems in the latest Mac this API is no longer supported. Is there some alternative way to query this information from the bootstrap service (launchd) in...
  7. Prplehz76

    Remote user that I can’t shake!

    I need some heavy duty help to shake a remote user! I’ve tried everything even had professional IT help but he’s sneaky and can disappear as quickly as he appears! I’ve got all the programs he/she is infiltrating and can see the workflow on my console. I have used sudo on my terminal and can...