I'm attempting to setup a Launch Agent that will run a simple shell script to mount a FUSE drive at login. I have written a .plist file and moved it into the ~/Library/LaunchAgents/ directory (shown below). Both the .plist and the shell script have permissions of 755. I am able to use the "launchctl load ~/Library/LaunchAgents/com.user.loginscript.plist" command to load the .plist, such that it then appears when I do "launchctl list". However, when I logout and then log back in again, I know the shell script hasn't run because the drive hasn't been mounted. I can confirm the script itself is probably not the problem, as it behaves correctly when run through Terminal. Does anyone have any ideas as to what may be preventing the Launch Agent from working as desired?
Thanks in advance.
Thanks in advance.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.loginscript</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>/Path/To/Script.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
</dict>
</plist>
Last edited: