Forum

Dissecting Your Bac...
 
Notifications
Clear all

Dissecting Your Backups — Mac Geek Gab 863


John F. Braun
(@johnfbraun)
Admin
Joined: 23 years ago
Posts: 168
Topic starter  
wpf-cross-image

Chapters/Timestamps/Stuff mentioned:

This topic was modified 4 months ago 2 times by Dave Hamilton
This topic was modified 3 months ago 2 times by Dave Hamilton

Quote
Dave Hamilton
(@davehamilton)
Admin
Joined: 23 years ago
Posts: 574
 

Regarding Lew's scripts where he disables Wi-Fi before creating a bootable clone and then re-enables Wi-Fi after creating it, here are the scripts, as promised!

WiFi_OFF.SH

#!/bin/sh

/usr/bin/afplay "/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/system/bu rn complete.aif"

networksetup -setairportpower en0 off

WiFi_ON.SH

#!/bin/sh

/usr/bin/afplay "/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/system/bu rn complete.aif"

networksetup -setairportpower en0 on

ReplyQuote
Scott Goldman
(@scott721)
New Member
Joined: 5 years ago
Posts: 3
 

This is a wonderful idea but for some reason I can't get the shell scripts to work. I've tried running them directly in the Terminal and get "zsh: permission denied: /Users/scott/Library/Scripts/Scott's Scripts/TurnWifiOff.sh" (that's the path to my script). Trying to use the "Run a shell script" in CCC yields the same result.

I've copied your script from above and pasted it into a BBEdit document, then saved the document as "TurnWifiOff.sh". Am I doing something wrong with the script? I'm an experienced Mac user and have built many helpful AppleScripts but shell scripts are a mystery to me.

Any thoughts? Thanks in advance.


ReplyQuote
Dave Hamilton
(@davehamilton)
Admin
Joined: 23 years ago
Posts: 574
 

Apologies for the delayed reply. In order to run a .sh shell script, it needs to be set to "executable." The easiest way to do that, using your file as an example, is to set it to "world executable" (meaning every user can run it). To do that, type the following into Terminal

chmod a+ x "/Users/scott/Library/Scripts/Scott’s Scripts/TurnWifiOff.sh"


ReplyQuote
Share: