I have a shell script that copies a plist into /Library/LaunchDaemons with sudo cp com.example.plist /Library/LaunchDaemons
then launches it with chown root com.example.plist
and launchctl load com.example.plist
This works perfectly when run from the command line but I need to create a way to distribute this shell script to non-technical Mac users, so that they can just download the script, double click it, (probably enter their username/password into a dialog box) and hit OK. Something like a .pkg or .dmg would be ideal.
I have tried Platypus and appify but neither works with sudo
because sudo causes it to hang while waiting for input that never comes. Is there a way to create an installer for this daemon or do I need to make an app?