diff --git a/Library/LaunchAgents/com.github.erikw.restic-automatic-backup.plist b/Library/LaunchAgents/com.github.erikw.restic-automatic-backup-scheduler.plist similarity index 95% rename from Library/LaunchAgents/com.github.erikw.restic-automatic-backup.plist rename to Library/LaunchAgents/com.github.erikw.restic-automatic-backup-scheduler.plist index 20d189e..5e34ab2 100644 --- a/Library/LaunchAgents/com.github.erikw.restic-automatic-backup.plist +++ b/Library/LaunchAgents/com.github.erikw.restic-automatic-backup-scheduler.plist @@ -6,7 +6,7 @@ Label - com.github.erikw.restic-automatic-backup + com.github.erikw.restic-automatic-backup-scheduler ProgramArguments diff --git a/Makefile b/Makefile index 6a2182e..71527eb 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ MKDIR_PARENTS=sh -c '\ # LaunchAgent names. UID := $(shell id -u) -LAUNCHAGENT = com.github.erikw.restic-automatic-backup +LAUNCHAGENT = com.github.erikw.restic-automatic-backup-scheduler LAUNCHAGENT_TARGET = gui/$(UID)/$(LAUNCHAGENT) # What to substitute $INSTALL_PREFIX in sources to. diff --git a/README.md b/README.md index e887e6d..3a39f14 100644 --- a/README.md +++ b/README.md @@ -295,16 +295,16 @@ $ brew services stop restic-automatic-backup-scheduler ``` 1. Now install, enable and start the first run! ```console - $ launchctl bootstrap gui/$UID ~/Library/LaunchAgents/com.github.erikw.restic-automatic-backup.plist - $ launchctl enable gui/$UID/com.github.erikw.restic-automatic-backup - $ launchctl kickstart -p gui/$UID/com.github.erikw.restic-automatic-backup + $ launchctl bootstrap gui/$UID ~/Library/LaunchAgents/com.github.erikw.restic-automatic-backup-scheduler.plist + $ launchctl enable gui/$UID/com.github.erikw.restic-automatic-backup-scheduler + $ launchctl kickstart -p gui/$UID/com.github.erikw.restic-automatic-backup-scheduler ``` As a convenience, a shortcut for the above commands are `$ make activate-launchagent`. Use the `disable` command to temporarily pause the agent, or `bootout` to uninstall it. ``` -$ launchctl disable gui/$UID/com.github.erikw.restic-automatic-backup -$ launchctl bootout gui/$UID/com.github.erikw.restic-automatic-backup +$ launchctl disable gui/$UID/com.github.erikw.restic-automatic-backup-scheduler +$ launchctl bootout gui/$UID/com.github.erikw.restic-automatic-backup-scheduler ``` If you updated the `.plist` file, you need to issue the `bootout` followed by `bootrstrap` and `enable` sub-commands of `launchctl`. This will guarantee that the file is properly reloaded.