diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..98e38f8 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +.PHONY: install + +install: + ./update-motd.sh + mkdir -p ${HOME}/Library/LaunchAgents/ + cp com.bruno21.update-motd.plist ${HOME}/Library/LaunchAgents/ + launchctl load -w ${HOME}/Library/LaunchAgents/com.bruno21.update-motd.plist + launchctl list | grep .update-motd + +uninstall: + sudo launchctl unload -w ${HOME}/Library/LaunchAgents/com.bruno21.update-motd.plist + rm ${HOME}/Library/LaunchAgents/com.bruno21.update-motd.plist + launchctl list | grep update-motd || exit 0 diff --git a/com.bruno21.update-motd.plist b/com.bruno21.update-motd.plist new file mode 100644 index 0000000..bcf3704 --- /dev/null +++ b/com.bruno21.update-motd.plist @@ -0,0 +1,69 @@ + + + + + Label + com.bruno21.update-motd + ProgramArguments + + sh + -c + ${HOME}/.local/bin/update-motd.sh + + StartCalendarInterval + + + Minute + 0 + + + Minute + 5 + + + Minute + 10 + + + Minute + 15 + + + Minute + 20 + + + Minute + 25 + + + Minute + 30 + + + Minute + 35 + + + Minute + 40 + + + Minute + 45 + + + Minute + 50 + + + Minute + 55 + + + StandardOutPath + /tmp/com.bruno21.update-motd.out + StandardErrorPath + /tmp/com.bruno21.update-motd.err + +