Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot reopen error #658

Open
jzastrow14 opened this issue Oct 15, 2024 · 1 comment
Open

cannot reopen error #658

jzastrow14 opened this issue Oct 15, 2024 · 1 comment

Comments

@jzastrow14
Copy link

i getting that error again don't know why. I started with a Dev Mac and it took 3 day for the polices to update then it started to work. so i moved to 2 test users and gave them 2 weeks to update and it's past that date and every time they tried to open the nudge app they got the can not reopen error. let me know what info you need to help track down what i messed up

@jzastrow14
Copy link
Author

#!/bin/bash

Determine Current User

currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )

Determine Current User ID

currentUserUID=id -u "$currentUser"

Generate Nudge launch agent

echo "

Label com.github.macadmins.Nudge ProgramArguments /Applications/Utilities/Nudge.app/Contents/MacOS/Nudge RunAtLoad StartInterval 14400 " > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist

Load Launch Agent

/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist

exit 0 ## Success
exit 1 ## Failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant