https://github.com/geoffrepoli/logind
login-aware launch daemon
https://github.com/geoffrepoli/logind
apple jamf jamf-pro macadmins macos macosx osx
Last synced: about 1 year ago
JSON representation
login-aware launch daemon
- Host: GitHub
- URL: https://github.com/geoffrepoli/logind
- Owner: geoffrepoli
- License: mit
- Created: 2017-08-10T19:52:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-19T13:53:13.000Z (over 4 years ago)
- Last Synced: 2025-05-13T00:48:48.776Z (about 1 year ago)
- Topics: apple, jamf, jamf-pro, macadmins, macos, macosx, osx
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# logind
Mac admins often have login workflows that require both (a) root permissions and (b) a user to be logged in (console user). While loginhooks used to serve this purpose, they've since been deprecated. Launch agents, on the other hand, satisfy (b) but not (a). **logind** attempts to solve the issue by using a launch daemon to check if a user is logged in before running your workflow.
## Getting Started
Download or clone the repository:
```
git clone https://github.com/geoffrepoli/logind.git
```
Replace the contents of `loginItems()` in [run.sh](run.sh) with the command(s) you want to execute at user login.
## Deployment
Once you've added your login tasks to `run.sh`, use the `build.sh` script to automatically configure a deployable pkg installer. In Terminal, enter the following:
```
cd logind && ./build.sh
```
An installer package `logind.pkg` will be created in the root of your logind directory, which you can then use to deploy to end users via MDM or other management tool.
If you intend to build the package installer yourself, make sure you've created the correct file paths in your package root. For reference: the default paths are `/Library/LaunchDaemons/com.doggles.logind.plist` and `/usr/local/logind/run.sh`.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details