Is there any change in the syntax of the launchd (LaunchDaemons) files from iOS 5.x to iOS 6.1?
I tried to install somethingfrom my iOS 5.1 iPhone4s to the iPhone5 (running iOS 6.1 JB with Evasi0n) and it gives me this error (in /var/log/syslog):
com.apple.launchd[1] (com.mydom.myScrpt[2601]): (com.mydom.myScrpt) Exited with code: 1
And it’s not a “myScrpt” problem, because I change myScrpt to:
#!/bin/sh
echo "----Test---"
but the only thing in /var/log/syslog was the error and nothing else
(doing the same in my iPhone4s, prints the "----Test---" line).
The syntax of my launchd file (that runs myScrpt at 14:00 as root) is
{
Label = "com.mydom.myScrpt";
LowPriorityIO = 1;
Nice = 9;
ProgramArguments = (
"/private/var/root/bin/myScrpt"
);
StartCalendarInterval = {
Hour = 14;
Minute = 00;
};
UserName = root;
}
What am I doing wrong? How should I write my launchd file to run my command at 14:00?
Add on your launchd file this:
to get the output of your script.
This is probably the “change” from iOS5 to iOS6.
Now you have to specify the output, ‘syslog’ is not used by default.