Closed sheagcraig closed 6 years ago
#!/usr/bin/python import subprocess from SystemConfiguration import SCDynamicStoreCopyConsoleUser current_user = SCDynamicStoreCopyConsoleUser(None, None, None)[0] notification = '/Library/Application\ Support/IT/bin/yo --title "IT Alert" --info "Updates required." --icon /Library/Application\ Support/CPE/share/DeathTaco.png' cmd = ['/usr/bin/su', '-l', current_user, '-c', notification] subprocess.call(cmd)