Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-22-2010, 11:20 AM
quattlebaum quattlebaum is offline
Registered User
 
Join Date: Sep 2008
Posts: 8
NOT Shutdown

I don't want to Shutdown - work requires we leave our Mac ON but at the login screen so they can do nightly backups and push updates when needed.
Reply With Quote
  #2  
Old 11-22-2010, 11:24 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
I see. Well, you can use something like

#!/bin/sh
nohup /bin/bash -c "sleep 20; osascript /path/to/scpt" &

as your shell script, substituting appropriately. This has to be saved to a plain text file with execute (+x) privileges.
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 11-22-2010, 11:35 AM
quattlebaum quattlebaum is offline
Registered User
 
Join Date: Sep 2008
Posts: 8
Thanks

Between your shell script and a shell tutorial from the web I believe this will solve my needs. If not, "I'll be back." :-)

thanks
qb
Reply With Quote
  #4  
Old 11-22-2010, 12:48 PM
quattlebaum quattlebaum is offline
Registered User
 
Join Date: Sep 2008
Posts: 8
No Restart... so I'm Baaack...

So I created the file "restart.sh" with the following contents and put it inside my SD folder:

#!/bin/sh
nohup /bin/bash -c "sleep 20; osascript /Applications/Apps QB/SuperDuper!/restart.scpt" &

-------
I used chmod as described here to modify "restart.sh":
chmod +x (and drag from finder the script 'remove_cache.sh')

---------
as a reminder "restart.scpt" has the following (and if I "run" this script the computer does restart):


tell application "Finder"
restart
end tell

-------
SD does execute "restart.sh" without any error my MacPro does not restart. Seems to cause the cpus to get utilized for a minute but nothing else.

Does anything need to be "complied"? Sorry for my programming innocence (ignorance!)

qb
Reply With Quote
  #5  
Old 11-22-2010, 01:12 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
The space in the path of the osascript isn't going to work. You'll need to escape that (and probably the exclamation point, too).

Why not temporarily just put it in /Applications to see if you can get it to work, and change the path to just
/Applications/restart.scpt
__________________
--Dave Nanian
Reply With Quote
  #6  
Old 11-22-2010, 02:02 PM
quattlebaum quattlebaum is offline
Registered User
 
Join Date: Sep 2008
Posts: 8
Success!

You are correct about the space in the path. Once i moved the scrips into /Applications and changed SD to find the .sh all worked find.

Many many thanks!

qb
Reply With Quote
  #7  
Old 11-22-2010, 02:27 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Glad to help.
__________________
--Dave Nanian
Reply With Quote
Reply

Tags
login screen, mac, restart, snow leopard


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
External firewire drive fails to boot OS X after a restart LEOinDC General 3 09-29-2008 09:33 AM
Simple problem. Simple solution? chrisjothi General 1 02-12-2008 01:03 PM
Cannot boot from Firewire drive using Option + Restart Mumbo Jumbo General 15 05-28-2007 10:49 PM
Restart from Sandbox > Could that be "temporary" please? mypointofview General 3 04-20-2006 09:57 PM


All times are GMT -4. The time now is 09:18 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.