2020-03-13 Can I Issue an instruction to XTension with a shell script rathe than with a applescript ?
Michel Angelo
michel_angelo at me.com
Fri Mar 13 18:09:38 EDT 2020
Hello James, Hi Philippe.
I hope your health prospects are fine on your side of the Atlantic.
I am still struggling with my backup with CCC operations. The sequence is as follows:
theM acBookPro install of XTension running on the MavcbookPro can (1) power up an external drive and (2), by an applescript commanding a shell script, instruct XTension to start backup operations.
Then, the MacBookPro install of CCC, running on the MacBokPro, clones the MacbookPro internal drive and its attached external drive to partitions of two external drives (one for weekdays and one for Sunday) attached to an iMac (this is done by a network connection).
These backup drives can be noisy and consume electrical power, so I shut them down when the backup task is complete and the CCC has ejected all the backup partitions.
Today, I do that with an independent timer, which timer ignores whether or not the backup tasks are completed.
Xtension, controlling a Vera, can easily power down the backup drives. I want XTension to replace my timer and receive from CCC the information that the last backup task is completed. But CCC does not do applescript. This is what Mike Bombich tells me about it:
"AppleScripts aren't supported for use with CCC's pre and postflight scripts. CCC's scripts run as the root user, and that poses challenges to AppleScript. In particular, the "tell application ..." part is going to fail – CCC runs "headless", and the invoked AppleScript will be unable to talk to the WindowServer – it will be unable to launch that application."
I understand XTension reliance on Applescript is bound to fail here. Can XTension receive instructions directly from a shell ()"postflight") script, which CCC can easily issue ?
Thanks for any help in this.
Copy of the shell script using an applescript which cannot work=
#!/bin/sh
osascript /Library/Application\ Support/com.bombich.ccc/Scripts/sPowerDownD2.scpt
while the called upon applescript (sPowerDownD2.scpt) simply states:
tell application "XTension"
execute script "Sauvegardes" handler "hPowerDownD2"
end tell
Is there any hope ?
TIA
—
Michel Angelo
<michel_angelo at me.com>
More information about the XTensionList
mailing list