-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
39 lines (31 loc) · 1.36 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
+-------------------------+
| vigilant - installation |
+-------------------------+
Note: working with macOS `launchd` is really annoying and
may take some finessing. If you encounter errors, they will
normally show up /var/log/system.log.
1) Copy the .plist file into ~/Library/LaunchAgents
2) Set the permissions of this file to be exactly that of the
other files in this directory. This is typically done with
`chmod 644 <file>`
3) Change the file path to the script in the .plist
4) Change the file path of the LOG_FILE in the script
5) Read the next section on using `launchctl`
launchctl
---------
1) sudo launchctl load ~/Library/LaunchAgents/xyz.briantracy.vigilant.plist
2) sudo launchctl unload ~/Library/LaunchAgents/xyz.briantracy.vigilant.plist
It is useful to move the script into your $PATH, so you can invoke from the shell.
$ chmod +x ./vigilant.py
$ mv ./vigilant.py /usr/local/bin/vigilant
$ vigilant
...
Troubleshooting
---------------
1) Remember to tail the system log (see above note)
- In the system log, there can be an error about permissions.
- In the system log, there can be an error about abnormal exit status.
This one means that the script is failing somehow. Try running
it manually to see what's happening.
2) The .plist specifies RunAtLoad, so unloading and reloading with `launchctl`
will restart the daemon.