Submitted for scrutiny (esp. since it doesn’t appear to be working…):
synctunesin.sh gets the latest iTunes Library info from the iTunes User account
synctunesout.sh takes your playcounts, updated ratings, etc. and updates them in the central iTunes User account
chmod to give them their “x” bits and then add as a LoginHook and a LogoutHook (respectively) via:
So in theory, these should run when a user logs in and logs out (respectively) effectively synchronizing the iTunes Library files. I know the scripts work because running them manually from the command line seems to sync things up. But they do not appear to be executing (or executing properly?) as Login/outHooks despite the fact that they were successfully added:
Thoughts? Comments? Suggestions? Alternatives?
About Rob FrieselSoftware engineer by day, science fiction writer by night. Author of The PhantomJS Cookbook and a short story in Please Do Not Remove. View all posts by Rob Friesel →
7 Responses to synctunes
“since it doesn’t appear to be working”
How is it not working?
“exit 0” may not exist or
code may not be referenced at all, look to see if execution is being bypassed by any preceding code.
it’s not working b/c when run via “sudo” in the Terminal, it syncs the iTunes libraries of every user ref’d in the scripts. however, logging in as a given user does not seems to update playcounts or new tracks in the library etc. (in other words, it’s not copying across the expected files.)
Do the user accounts have the proper priviledges to copy those files?
that’s sort of the trick…
the script runs as root after they’ve entered their password but before the OS X desktop loads
when i was testing the script manually, the first problem I encountered was that these users could not load iTunes b/c of permissions problems on the individual library files– a couple of “chown” and “chmod” commands later, this was sussed out though
and running the scripts manually w/ sudo on the terminal doesn’t change the ownership so i don’t think that’s it either