Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MAC Server automation

Hi,


We have a MACpro server (OSX 10.11.6) where some tasks need to be automated; however this isn't going the way it should for now. I am in no way familiar with MAC; so bear with me.


Plan:

- Have three separate shell-scripts trigger at every minute/hour of the day/day of the week. The shell scripts are tested and work as they should when triggered from the command line typing: sh nameofscript.sh

° Each script has #!/bin/sh on the first line.


- Every script needs to be triggered by a separate PLIST file stored in /Library/LaunchDaemons. These scripts have been tested by putils which returned "ok". We've also replicated the server-settings on a mac-mini which is used to test the automation; there it works flawlessly.

° System has read & write on the plist

° Wheels has read on the plist


Situation:

- MAC Server refuses to execute the shell script when triggered via the plist file (even though the same permission on the plist are used on the MAC server as on the MAC mini for testing purposes.


- Sudo launchctl list gives:

° - 0 name_of_plist (when loaded)

which turns to:

° - 78 name_of_plist (After it should've been triggered)


Code 78 means that the 'function is not implemented', which doesn't explain much.



When looking in the system log by typing tail -f /var/log/system.log in the terminal we can't find any relevant error codes. When deliberately breaking the plist configuration on the MAC mini it does manage to write relevant error codes to/var/log/system.log


Questions:

- Is there some setting on the server that could prevent plist files from running?

- I've read that LaunchDaemons have no GUI-part, is there a work-around to this so that we can try to figure out where something goes haywire?

- The only reasons I found on the web that could explain the failure of the plist files are:

° Missing hashbang in the shell-script (It is present)

° Wrong permissions on the plist file (It's the same on the server and the mini; however only the mini works)

What have we missed??

Mac Pro, OS X El Capitan (10.11.6), Running as server

Posted on Mar 2, 2018 2:52 AM

Reply

Similar questions

There are no replies.

MAC Server automation

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.