It works fine in terminal and when logging out. However, it takes forever to run the script at logout...A minute and a half.
Is there a way to just run the command and targeting the current directory it is contained in? What would the syntax be to search the directory Library/Preferences?
Deleting is the easy part....
History of this:
We run an AD environment with MACs running 10.3.9 and 10.4.11
The com.apple.sidebarlists.plist sets up differently when logging onto either OS. So, when you go back and forth between OS's - A volume error occurs. Apple has confirmed this issue.
Their suggestion was to write a script to delete the file at logout.
The script above actually works, but thier is a lag time when logging out.
I tried the nohup command, but so far it hasn't worked for a user connected to the server.
Using the (find . -name) searches through all files on the drive before hitting the correct file to delete. (SLOW)
I have tried find ./Library in the sh but it only works in terminal and will not work when logging out.
Is there a variable in which I can put into the script that will go directly to the file and delete it?
I use the above variable to run different script stuff against different osx versions. Since they all seem to be different and require specific scripts for each one :rolleyes:
The above worked- the ~ helped to search only the users folder. Note: these are users' on the network that connect to Mac server.
Now- for the logon script...I need to also delete the file at logon..The initial script works at logon but slowly- it eventually gets to the home folder to delete, but need it faster.
Any suggestions? I will post once I figure out the solution today.
Thanks....AG
---------- Post updated at 11:20 PM ---------- Previous update was at 06:41 AM ----------
any way to run the script in the background so the user does not have to wait for it to process?
This does not hang up on login, however, after system logon, it will take 30 seconds to delete the file....I need it done immediately after logon..I cannot have a delay.
Any thoughts?