Similar to this question, I'm trying to run a script to wrap the launch of a game simply for purposes of tracking how long I've been playing.
The way I have it set up currently is:
- Move the original executable to a new filename, and make a bash script to replace it (making sure to mark it executable)
curl
out a URL to notify a server (that's keeping timestamps, etc.) that I've started- Launch the actual game (using
$@
to make sure any options are sent in as well) curl
out a URL to notify a server that I'm done
I didn't think this would pose issues, but for whatever reason when actually running through Steam the curl
command exits with status code 48
and game begins as if nothing happened. If I just run the script by hand, curl
runs successfully but the game notifies me that it can't connect to Steam.
Is there a way to actually wrap commands instead of just polling to determine if the game has launched? Thank you!