Rename launchagent for consistency
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.github.erikw.restic-automatic-backup</string>
|
||||
<string>com.github.erikw.restic-automatic-backup-scheduler</string>
|
||||
<key>ProgramArguments</key>
|
||||
<!-- exec in subshell to 1) source *.env.sh 2) expand $HOME to logpath (ref. https://apple.stackexchange.com/a/365880/197493) -->
|
||||
<array>
|
||||
2
Makefile
2
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.
|
||||
|
||||
10
README.md
10
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.
|
||||
|
||||
Reference in New Issue
Block a user