[launchd-dev] multiple commands in one launchd item

Damien Sorresso dsorresso at apple.com
Sun Dec 13 23:07:01 PST 2009


On Dec 13, 2009, at 8:05 PM, dev.admin at ntlworld.com wrote:
> Hi,
> 
> Just spent *hours* experimenting with this and although it
> is possible to add several commands into a LaunchDaemon using
> the previously mention ProgramArguments from Damien
> i.e. /bin/bash -c *code* as separate items, you can only use
> one item line for the entire script. It's not long before it
> becomes unreadable.
> 
> All-in all, as Nehemiah mentioned, if it can go into a script,
> it probably should go into a script.
> 
> However, all LaunchDaemon external scripts should have the same
> level of permissions as a LaunchDaemon plist file. Otherwise
> it's a potential security threat. The contents of the external
> file could be changed to whatever.
> 
> The owner/group should be root/wheel and the mode 0755.

launchd will enforce the required ownership.
-- 
Damien Sorresso
BSD Engineering
Apple Inc.



More information about the launchd-dev mailing list