I have a small shell script which loads a launchctl com.skull.tst.plist. But when i run script its not loading launchctl. I am getting echo match and running script with sudo.
When i copy sudo /bin/launchctl load -wF /Library/LaunchDaemons/com.skull.tst.plist
in terminal it works fine and loads.
why it's not loading with shell scripts?
#!/bin/sh
ve="1013"
if [ "$ve" == "1013" ]; then
echo "match"
/bin/launchctl load -wF /Library/LaunchDaemons/com.skull.tst.plist
else
exit
fi