-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
129 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ DerivedData | |
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
*.pkg | ||
|
||
# CocoaPods | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Enroll Me | ||
--- | ||
##### Author: [Yoann Gini](https://www.github.com/ygini) | ||
|
||
### Description: | ||
This initial settings must be used with additional [Hello IT script made to trigger the DEP enrollment popup](https://github.com/ygini/ygini-scripts-macos/tree/master/EnrollMe). | ||
|
||
Main idea would be to replace your current Hello IT settings with a single item presenting the red state and asking for enrollment. | ||
|
||
The user clicking on the Hello IT item will be admin for few seconds, just the time for macOS to show the enrollment notification. | ||
|
||
Once the notification is shown, the user does not need to be admin to continue the process. | ||
|
||
Non-DEP scenario isn't supported and providing help text to the user isn't handled. In this scenario, you are supposed to send an e-mail or something to the end users, explaining what they are supposed to do. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>content</key> | ||
<array> | ||
<dict> | ||
<key>functionIdentifier</key> | ||
<string>public.script.item</string> | ||
<key>settings</key> | ||
<dict> | ||
<key>title</key> | ||
<dict> | ||
<key>fr</key> | ||
<string>Enrôler votre Mac</string> | ||
<key>en</key> | ||
<string>Enroll this Mac</string> | ||
</dict> | ||
<key>script</key> | ||
<string>com.github.ygini.enrollme.hello-it.sh</string> | ||
</dict> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
SRC_DIR="$(dirname ${BASH_SOURCE[0]})" | ||
PKG_VERSION="$(date +%Y.%m.%d).1" | ||
|
||
PKG_ROOT=$(mktemp -d) | ||
echo "####### Create package" | ||
|
||
mkdir -p "${PKG_ROOT}/Library/Preferences" | ||
cp -r "${SRC_DIR}/com.github.ygini.Hello-IT.plist" "${PKG_ROOT}/Library/Preferences" | ||
|
||
pkgbuild --root "${PKG_ROOT}" --identifier "com.github.ygini.enrollme.hello-it.prefs" --scripts "${SRC_DIR}/pkg_scripts" --version "${PKG_VERSION}" "${SRC_DIR}/HelloIT-EnrollMe-Prefs-${PKG_VERSION}.pkg" | ||
|
||
rm -rf "${PKG_ROOT}" | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
killall cfprefsd | ||
|
||
while read shortname | ||
do | ||
uid=$(id -u "$shortname") | ||
|
||
if [ -n "$uid" ] | ||
then | ||
/bin/launchctl asuser "$uid" /bin/launchctl unload /Library/LaunchAgents/com.github.ygini.hello-it.plist | ||
/bin/launchctl asuser "$uid" /bin/launchctl remove com.github.ygini.hello-it | ||
/bin/launchctl asuser "$uid" /bin/launchctl load /Library/LaunchAgents/com.github.ygini.hello-it.plist | ||
fi | ||
done < <(ps aux | grep "MacOS/[F]inder" | awk '{print $1}') | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters