Timeline for How can I use $HOME or ~/ in my log paths of launchd plist to run as LaunchAgent
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 5, 2019 at 8:50 | comment | added | MacDeveloper | I fixed it by redirecting my script to that log path as shown below by jksoegaard answer. | |
Aug 5, 2019 at 0:55 | comment | added | TJ Luoma |
Without knowing more about what you are trying to do, it's hard to say, but I might try a LaunchDaemon that runs as root and then have it execute commands as the logged in user.
|
|
Aug 4, 2019 at 15:13 | comment | added | MacDeveloper | But we Never know how long it will be supported and I cant use it in production | |
Aug 4, 2019 at 1:01 | comment | added | TJ Luoma | If you have root access, try a LoginHook instead of using launchd. It's technically deprecated but it still works fine. | |
Aug 3, 2019 at 18:55 | comment | added | MacDeveloper | Launchagent main purpose is operating system will load them during login/reboot.How can I run these commands in other user accounts bcoz first time during manual loading it takes current home directory but when I logout and login to other user I cant run these commands and my plist load fails. | |
Aug 2, 2019 at 14:03 | history | answered | TJ Luoma | CC BY-SA 4.0 |