Rename launchagent for consistency
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>Label</key>
|
<key>Label</key>
|
||||||
<string>com.github.erikw.restic-automatic-backup</string>
|
<string>com.github.erikw.restic-automatic-backup-scheduler</string>
|
||||||
<key>ProgramArguments</key>
|
<key>ProgramArguments</key>
|
||||||
<!-- exec in subshell to 1) source *.env.sh 2) expand $HOME to logpath (ref. https://apple.stackexchange.com/a/365880/197493) -->
|
<!-- exec in subshell to 1) source *.env.sh 2) expand $HOME to logpath (ref. https://apple.stackexchange.com/a/365880/197493) -->
|
||||||
<array>
|
<array>
|
||||||
@@ -52,7 +52,7 @@ MKDIR_PARENTS=sh -c '\
|
|||||||
|
|
||||||
# LaunchAgent names.
|
# LaunchAgent names.
|
||||||
UID := $(shell id -u)
|
UID := $(shell id -u)
|
||||||
LAUNCHAGENT = com.github.erikw.restic-automatic-backup
|
LAUNCHAGENT = com.github.erikw.restic-automatic-backup-scheduler
|
||||||
LAUNCHAGENT_TARGET = gui/$(UID)/$(LAUNCHAGENT)
|
LAUNCHAGENT_TARGET = gui/$(UID)/$(LAUNCHAGENT)
|
||||||
|
|
||||||
# What to substitute $INSTALL_PREFIX in sources to.
|
# What to substitute $INSTALL_PREFIX in sources to.
|
||||||
|
|||||||
@@ -295,16 +295,16 @@ $ brew services stop restic-automatic-backup-scheduler
|
|||||||
```
|
```
|
||||||
1. Now install, enable and start the first run!
|
1. Now install, enable and start the first run!
|
||||||
```console
|
```console
|
||||||
$ launchctl bootstrap gui/$UID ~/Library/LaunchAgents/com.github.erikw.restic-automatic-backup.plist
|
$ launchctl bootstrap gui/$UID ~/Library/LaunchAgents/com.github.erikw.restic-automatic-backup-scheduler.plist
|
||||||
$ launchctl enable gui/$UID/com.github.erikw.restic-automatic-backup
|
$ launchctl enable gui/$UID/com.github.erikw.restic-automatic-backup-scheduler
|
||||||
$ launchctl kickstart -p gui/$UID/com.github.erikw.restic-automatic-backup
|
$ 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`.
|
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.
|
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 disable gui/$UID/com.github.erikw.restic-automatic-backup-scheduler
|
||||||
$ launchctl bootout gui/$UID/com.github.erikw.restic-automatic-backup
|
$ 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.
|
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