[launchd-dev] multiple commands in one launchd item

dev.admin at ntlworld.com dev.admin at ntlworld.com
Sun Dec 13 20:05:02 PST 2009


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.

A.



More information about the launchd-dev mailing list