What I want is to send a URL with variables to a server which will track when someone is present based on when they login and logout of their workstation.
I've tried setting the LoginHook
in com.apple.loginwindow
to "/Users/Username/Desktop/script.sh". script.sh
works when I execute it myself from the terminal, but it doesn't run from the LoginHook
.
The script executes the following, where $USER
should be the name of the user currently logged in:
curl -kd "author=$USER&type=inout&message=in" https://some.server.com/timetrack
$USER
here. Do you know if the script executes at all?#!/bin/bash
at the start of your script? It appears you can get the username in the script with$1
instead of$USER
.