Posted on 09-21-2016 08:20 PM
Hi All,
We have a script that we locally install on each computer. Does anybody know how I can add a delay so the user has time to type in their password to mount network disks before terminal automatically closes?
Thanks.
Solved! Go to Solution.
Posted on 09-22-2016 07:11 AM
Here's one way:
sleep 1800 && osascript -e 'tell application "Terminal" to quit'
The 1800 is seconds. Probably longer than you need, but you get the idea
Is there a reason you are using terminal for password input?
Posted on 09-22-2016 04:22 AM
Is this script triggered by an event (startup, login, etc.), running on a schedule, or is it manually executed? If you could provide an example of what the script is doing, it would be helpful.
Posted on 09-22-2016 05:06 AM
If your you using a script your could do it in bash using the sleep command. I sometimes use it to ensure the network connection is established before trying to do a network task.
Posted on 09-22-2016 07:11 AM
Here's one way:
sleep 1800 && osascript -e 'tell application "Terminal" to quit'
The 1800 is seconds. Probably longer than you need, but you get the idea
Is there a reason you are using terminal for password input?