Copy the launch daemon file named com.startup.script.plist
in /Library/LaunchDaemons
. Then set the permissions for it
sudo chmod +x /Library/LaunchDaemons/com.startup.script.plist
sudo chown root:wheel /Library/LaunchDaemons/com.startup.script.plist
Next copy the shell script updatetime.sh
in /usr/local/bin/
.
Make it executable with sudo chmod +x /usr/local/bin/updatetime.sh
and owned
by root:wheel
with sudo chown root:wheel /usr/local/bin/updatetime.sh
.
Enable and launch the Daemon with:
sudo launchctl load -w /Library/LaunchDaemons/com.startup.script.plist