Home Forums OS X Server and Client Discussion Questions and Answers launchd script problems

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #367733
    EEPS
    Participant

    Hi all, I am new here and need some help with a launchd issue. I wrote some scripts to get around an issue we are having with printing via samba in an active directory environment. The scripts work great and now I am trying to set them up to us launchd to start them when needed. I wrote a plist file for my script. following the “launchd in Depth” article on this site. I then put a .launchd.conf file in my user home folder. The .launchd.conf in the user home folder has only one line and that is:

    [code]
    load ~/Library/LaunchDaemons/com.USRV.smb_user_print.plist
    [/code]

    When I run this manually, logged in as the user, everything works fine and “launchctl list” shows the plist is loaded and my printing scripts work. However, what I want is for OS X to load this plist when the user logs in and have it run the scripts as the user. When I log out and log back in, the plist is not loaded, and when I run “launchctl list” it says “nothing found to load”. I know it is reading the .launchd.conf file because when I had a typo in the file, it would tell me there was some error. So what I don’t understand is why I can run the command manually, and it works fine, but launchctl is not able to load it via the .launchd.conf file.

    I would post my plist file but the code tag does not seem to prevent the xml from being interpreted….

    Thank you,
    Eric Seifert

    #367735
    EEPS
    Participant

    Wow, I’m dumb. I was Using LaunchDaemonds folder instead of LaunchAgents and it worked perfectly without even using .launchd.conf Thanks for the help!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed